Skip to content

Commit

Permalink
Release/1.0.47/prepare (#864)
Browse files Browse the repository at this point in the history
* fix FBR 697

* fix FBR 701
  • Loading branch information
BrianMuhimbura authored Jul 1, 2024
1 parent c87f6dd commit e8c3b38
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ SELECT COUNT(ml.id) AS totalCount
BigDecimal membersPercentage = BigDecimal.valueOf(100L);
if (numberOfMembers != null && numberOfMembers < Long.valueOf(totalMembers)) {
membersPercentage = BigDecimal.valueOf(100L)
.multiply(BigDecimal.valueOf(numberOfMembers).divide(BigDecimal.valueOf(totalMembers), MoneyHelper.getRoundingMode()));
.multiply(BigDecimal.valueOf(numberOfMembers).divide(BigDecimal.valueOf(totalMembers),2, MoneyHelper.getRoundingMode()));
}
reportParams.put("${membersPercentage}", String.valueOf(membersPercentage));
final GenericResultsetData result = this.readReportingService.retrieveGenericResultset(reportName, "report", reportParams, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,18 @@
]]>
</sql>
</changeSet>
<changeSet id="30" author="fineract">
<sql>
<![CDATA[
UPDATE stretchy_report SET report_sql = "SELECT
CASE
WHEN (${membersPercentage} = 100) THEN 'GREEN'
ELSE 'RED'
END AS color"
WHERE report_name = "Percentage of members with their own business Policy Check";
]]>
</sql>
</changeSet>


</databaseChangeLog>

0 comments on commit e8c3b38

Please sign in to comment.