Skip to content
Open
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 @@ -56,6 +56,18 @@
<where>id='150' AND report_name = 'ClientTrendsByWeek'</where>
</update>
</changeSet>
<!-- PostgreSQL-Fix for ClientTrendsByWeek -->
<changeSet author="fineract" id="3-postgresql" context="postgresql">
<update tableName="stretchy_report">
<column name="report_sql" value="SELECT COUNT(cl.id) AS count, EXTRACT(WEEK FROM cl.activation_date) AS Weeks
FROM m_office o LEFT JOIN m_client cl on o.id = cl.office_id
WHERE o.hierarchy like concat((select ino.hierarchy from m_office ino where ino.id = ${officeId}),'%' )
AND (cl.activation_date BETWEEN (CURRENT_DATE - INTERVAL '12 weeks') AND CURRENT_DATE)
GROUP BY Weeks
"/>
<where>id='150' AND report_name = 'ClientTrendsByWeek'</where>
</update>
</changeSet>
<!-- ClientTrendsByMonth -->
<changeSet author="fineract" id="4" context="mysql">
<update tableName="stretchy_report">
Expand All @@ -68,6 +80,19 @@
<where>id='151' AND report_name = 'ClientTrendsByMonth'</where>
</update>
</changeSet>
<!-- PostgreSQL fix for ClientTrendsByMonth (FINERACT-2436) -->
<changeSet author="fineract" id="4-postgresql" context="postgresql">
<update tableName="stretchy_report">
<column name="report_sql" value="SELECT COUNT(cl.id) AS count, TO_CHAR(cl.activation_date, 'Month') AS Months
FROM m_office o LEFT JOIN m_client cl on o.id = cl.office_id
WHERE o.hierarchy like concat((select ino.hierarchy from m_office ino where ino.id = ${officeId}),'%' )
AND (cl.activation_date BETWEEN (CURRENT_DATE - INTERVAL '12 months') AND CURRENT_DATE)
GROUP BY Months
"/>
<where>id='151' AND report_name = 'ClientTrendsByMonth'</where>
</update>
</changeSet>

<!-- LoanTrendsByDay -->
<changeSet author="fineract" id="25" context="mysql" runOnChange="true">
<update tableName="stretchy_report">
Expand Down
Loading