Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/fsf 21 #989

Merged
merged 2 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ CASE WHEN (mlag.current_credit_value <= 0) THEN 0
* Mandatory to attach photographs and investment plan
*/
private CheckValidationColor runCheck4(final ClientData clientData) {
final ClientData clientParams = retrieveClientParams(clientData.getClientId(), clientData.getProductId());
final String reportName = Policies.FOUR.getName() + " Policy Check";
final String productId = Long.toString(clientData.getProductId());
final Long loanId = clientData.getLoanId();
Expand All @@ -441,7 +440,7 @@ SELECT COUNT(*)

final Map<String, String> reportParams = new HashMap<>();
reportParams.put("${loanProductId}", productId);
reportParams.put("${categorization}", clientParams.getCategorization());
reportParams.put("${categorization}", clientData.getCategorization());
reportParams.put("${investmentPlan}", Long.toString(investmentPlanCount));
reportParams.put("${photographs}", Long.toString(photographsCount));
reportParams.put("${requestedAmount}", clientData.getRequestedAmount().toPlainString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,5 +253,19 @@
</sql>
</changeSet>

<changeSet id="8" author="fineract">
<sql>
<![CDATA[
UPDATE stretchy_report SET report_sql = " SELECT CASE
WHEN (${loanProductId} IN (9)) AND ${categorization} = 'RECREDITO' AND ${requestedAmount} <= 6000 THEN 'GREEN'
WHEN (${loanProductId} IN (2,8)) AND ${requestedAmount} <= 6000 THEN 'GREEN'
WHEN (${loanProductId} IN (2,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";
]]>
</sql>
</changeSet>


</databaseChangeLog>
Loading