forked from FITER1/fineract-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix FSF-9 * fix FSF-4 (#945) * Fix/fsf 11 (#947) * fix FSF-4 * fix FSF-11 * Fix/fsf 11 (#950) * fix FSF-4 * fix FSF-11 * fix FSF-11 * fix FSF-17 (#957) * fix FSF-15 * fix FSF-12 * fix FSF-19 * fix FSF-19 (#969) * Fix/fs 18 (#977) * fix FSF-19 * FIX FSF-18 * Fix/fsf 20 (#980) * fix FSF-19 * FIX FSF-18 * FIX FSF-20 * QA-FSF-18-20 * Fix/fsf 21 (#989) * FSF 22 * FSF 22 * Fix/fsf 21 (#990) * FSF 22 * FSF 22 * FSF 22 * FSF 23 (#992) * FBR-710 (#1000) * Fix/fsf 24 (#1014) * FBR-710 * FSF-24 * Feature/fbr 714 (#1018) * FBR-710 * FBR-714
- Loading branch information
1 parent
0af84c4
commit 81b5e04
Showing
15 changed files
with
581 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
fineract-provider/src/main/resources/db/changelog/tenant/commands/BACCOMMEDA/client_age.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
-- | ||
-- Licensed to the Apache Software Foundation (ASF) under one | ||
-- or more contributor license agreements. See the NOTICE file | ||
-- distributed with this work for additional information | ||
-- regarding copyright ownership. The ASF licenses this file | ||
-- to you under the Apache License, Version 2.0 (the | ||
-- "License"); you may not use this file except in compliance | ||
-- with the License. You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, | ||
-- software distributed under the License is distributed on an | ||
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
-- KIND, either express or implied. See the License for the | ||
-- specific language governing permissions and limitations | ||
-- under the License. | ||
-- | ||
|
||
SELECT @productId := (select id from m_product_loan where short_name='BCOMMEDA' limit 1); | ||
UPDATE stretchy_report SET report_sql = concat('SELECT mc.id, | ||
client_age.client_age AS client_age, | ||
mc.date_of_birth AS date_of_birth, | ||
CASE | ||
-- Banco Comunal normal | ||
WHEN (${loanProductId} = 2) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) BETWEEN 18 AND 70) THEN ''GREEN'' | ||
WHEN (${loanProductId} = 2) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) BETWEEN 71 AND 75) THEN ''YELLOW'' | ||
WHEN (${loanProductId} = 2) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) NOT BETWEEN 18 AND 75) THEN ''RED'' | ||
WHEN (${loanProductId} = 2) AND (''${clientCategorization}'' = ''RECURRING'') AND (IFNULL(client_age.client_age, 0) BETWEEN 18 AND 75) THEN ''GREEN'' | ||
WHEN (${loanProductId} = 2) AND (''${clientCategorization}'' = ''RECURRING'') AND (IFNULL(client_age.client_age, 0) NOT BETWEEN 18 AND 75) THEN ''RED'' | ||
-- Banco Comunal normal meda | ||
WHEN (${loanProductId} = ',@productId,') AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) BETWEEN 18 AND 70) THEN ''GREEN'' | ||
WHEN (${loanProductId} = ',@productId,') AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) BETWEEN 71 AND 75) THEN ''YELLOW'' | ||
WHEN (${loanProductId} = ',@productId,') AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) NOT BETWEEN 18 AND 75) THEN ''RED'' | ||
WHEN (${loanProductId} = ',@productId,') AND (''${clientCategorization}'' = ''RECURRING'') AND (IFNULL(client_age.client_age, 0) BETWEEN 18 AND 75) THEN ''GREEN'' | ||
WHEN (${loanProductId} = ',@productId,') AND (''${clientCategorization}'' = ''RECURRING'') AND (IFNULL(client_age.client_age, 0) NOT BETWEEN 18 AND 75) THEN ''RED'' | ||
-- Banco Comunal temporal | ||
WHEN (${loanProductId} = 9) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) BETWEEN 18 AND 70) THEN ''GREEN'' | ||
WHEN (${loanProductId} = 9) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) BETWEEN 71 AND 75) THEN ''YELLOW'' | ||
WHEN (${loanProductId} = 9) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) NOT BETWEEN 18 AND 75) THEN ''RED'' | ||
WHEN (${loanProductId} = 9) AND (''${clientCategorization}'' = ''RECURRING'') AND (IFNULL(client_age.client_age, 0) BETWEEN 18 AND 75) THEN ''GREEN'' | ||
WHEN (${loanProductId} = 9) AND (''${clientCategorization}'' = ''RECURRING'') AND (IFNULL(client_age.client_age, 0) NOT BETWEEN 18 AND 75) THEN ''RED'' | ||
-- Banco Comunal Agricola | ||
WHEN (${loanProductId} = 8) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) BETWEEN 18 AND 70) THEN ''GREEN'' | ||
WHEN (${loanProductId} = 8) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) BETWEEN 71 AND 75) THEN ''YELLOW'' | ||
WHEN (${loanProductId} = 8) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) NOT BETWEEN 18 AND 75) THEN ''RED'' | ||
WHEN (${loanProductId} = 8) AND (''${clientCategorization}'' = ''RECURRING'') AND (IFNULL(client_age.client_age, 0) BETWEEN 18 AND 75) THEN ''GREEN'' | ||
WHEN (${loanProductId} = 8) AND (''${clientCategorization}'' = ''RECURRING'') AND (IFNULL(client_age.client_age, 0) NOT BETWEEN 18 AND 75) THEN ''RED'' | ||
-- Grupo Solidario | ||
WHEN (${loanProductId} = 4) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) BETWEEN 18 AND 70) THEN ''GREEN'' | ||
WHEN (${loanProductId} = 4) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) BETWEEN 71 AND 75) THEN ''YELLOW'' | ||
WHEN (${loanProductId} = 4) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) NOT BETWEEN 18 AND 75) THEN ''RED'' | ||
WHEN (${loanProductId} = 4) AND (''${clientCategorization}'' = ''RECURRING'') AND (IFNULL(client_age.client_age, 0) BETWEEN 18 AND 75) THEN ''GREEN'' | ||
WHEN (${loanProductId} = 4) AND (''${clientCategorization}'' = ''RECURRING'') AND (IFNULL(client_age.client_age, 0) NOT BETWEEN 18 AND 75) THEN ''RED'' | ||
-- Grupo Solidario Agricola | ||
WHEN (${loanProductId} = 5) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) BETWEEN 18 AND 70) THEN ''GREEN'' | ||
WHEN (${loanProductId} = 5) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) BETWEEN 71 AND 75) THEN ''YELLOW'' | ||
WHEN (${loanProductId} = 5) AND (''${clientCategorization}'' = ''NEW'') AND (IFNULL(client_age.client_age, 0) NOT BETWEEN 18 AND 75) THEN ''RED'' | ||
WHEN (${loanProductId} = 5) AND (''${clientCategorization}'' = ''RECURRING'') AND (IFNULL(client_age.client_age, 0) BETWEEN 18 AND 75) THEN ''GREEN'' | ||
WHEN (${loanProductId} = 5) AND (''${clientCategorization}'' = ''RECURRING'') AND (IFNULL(client_age.client_age, 0) NOT BETWEEN 18 AND 75) THEN ''RED'' | ||
END AS color | ||
FROM m_client mc | ||
INNER JOIN ( | ||
SELECT mct.id AS client_id, mct.date_of_birth AS date_of_birth, IFNULL(TIMESTAMPDIFF(YEAR, mct.date_of_birth, CURDATE()), 0) AS client_age | ||
FROM m_client mct | ||
) client_age ON client_age.client_id = mc.id | ||
WHERE mc.id = ${clientId}') | ||
WHERE report_name = 'Client age Policy Check'; |
27 changes: 27 additions & 0 deletions
27
...t-provider/src/main/resources/db/changelog/tenant/commands/BACCOMMEDA/investment_plan.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-- | ||
-- Licensed to the Apache Software Foundation (ASF) under one | ||
-- or more contributor license agreements. See the NOTICE file | ||
-- distributed with this work for additional information | ||
-- regarding copyright ownership. The ASF licenses this file | ||
-- to you under the Apache License, Version 2.0 (the | ||
-- "License"); you may not use this file except in compliance | ||
-- with the License. You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, | ||
-- software distributed under the License is distributed on an | ||
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
-- KIND, either express or implied. See the License for the | ||
-- specific language governing permissions and limitations | ||
-- under the License. | ||
-- | ||
|
||
SELECT @productId := (select id from m_product_loan where short_name='BCOMMEDA' limit 1); | ||
UPDATE stretchy_report SET report_sql = concat(' SELECT CASE | ||
WHEN (${loanProductId} IN (9)) AND ''${categorization}'' = ''RECREDITO'' AND ${requestedAmount} <= 6000 THEN ''GREEN'' | ||
WHEN (${loanProductId} IN (2,',@productId,',8)) AND ${requestedAmount} <= 6000 THEN ''GREEN'' | ||
WHEN (${loanProductId} IN (2,',@productId,',9,8,4,5,7)) AND (${photographs} <= 0 OR ${investmentPlan} <= 0) THEN ''RED'' | ||
ELSE ''GREEN'' | ||
END AS color') | ||
WHERE report_name = 'Mandatory to attach photographs and investment plan Policy Check'; |
Oops, something went wrong.