Skip to content

Commit 3a59a72

Browse files
committed
FINERACT-2326: Fix Trial Balance Summary with asset owner report
1 parent 0a0e3eb commit 3a59a72

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fineract-provider/src/main/resources/db/changelog/tenant/parts/0202_trial_balance_summary_with_asset_owner_journal_entry_aggregation.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2424
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
2525

26-
<changeSet author="fineract" id="trial-balance-summary-with-asset-owner-update-2">
26+
<changeSet author="fineract" id="trial-balance-summary-with-asset-owner-update-3">
2727
<update tableName="stretchy_report">
2828
<column name="report_sql" value="WITH retained_earning AS (
2929
SELECT DISTINCT '${endDate}' AS postingdate,
@@ -81,10 +81,10 @@
8181
GROUP BY productname, glcode, glname, assetowner
8282
),
8383
merged_historical_data AS (
84-
SELECT summary_snapshot_baseline_data.productname,
85-
summary_snapshot_baseline_data.glcode,
86-
summary_snapshot_baseline_data.glname,
87-
summary_snapshot_baseline_data.assetowner,
84+
SELECT COALESCE(summary_snapshot_baseline_data.productname, post_snapshot_delta_data.productname) AS productname,
85+
COALESCE(summary_snapshot_baseline_data.glcode, post_snapshot_delta_data.glcode) AS glcode,
86+
COALESCE(summary_snapshot_baseline_data.glname, post_snapshot_delta_data.glname) AS glname,
87+
COALESCE(summary_snapshot_baseline_data.assetowner, post_snapshot_delta_data.assetowner, 0) AS assetowner,
8888
COALESCE(summary_snapshot_baseline_data.debitamount, 0) + COALESCE(post_snapshot_delta_data.debitamount, 0) AS debitamount,
8989
COALESCE(summary_snapshot_baseline_data.creditamount, 0) + COALESCE(post_snapshot_delta_data.creditamount, 0) AS creditamount
9090
FROM summary_snapshot_baseline_data

0 commit comments

Comments
 (0)