Skip to content
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Improvements:
* Stabilized consul registration and health checks
* [ODRC-24](https://openlmis.atlassian.net/browse/ODRC-24) Global header and translations implemented for reports

Bugs:
* [OLMIS-8187](https://openlmis.atlassian.net/browse/OLMIS-8187) Fix duplicate rows in Periodic SOH report
New functionality:
* [MW-1449](https://openlmis.atlassian.net/browse/MW-1449): Added Superset guest token endpoint for embedded dashboards. Dashboard reports now carry an optional `embeddedUuid` column referencing a Superset embedded dashboard. The new `/api/reports/superset/guest-token` endpoint exchanges an OpenLMIS user for a short-lived Superset guest token, gated by the `REPORTS_VIEW` right and a lookup against the dashboard's `embeddedUuid`.

Expand Down

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions src/main/resources/reports/periodic_stock_on_hand_summary.jrxml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@
right_assignments.rightname = 'STOCK_CARDS_VIEW'
AND right_assignments.userId = $P{userId}:: uuid
),
latest_orderables AS (
SELECT DISTINCT ON (id)
id,
fullproductname,
code,
versionnumber
FROM referencedata.orderables
ORDER BY
id,
versionnumber DESC
),
stock_data AS (
SELECT
o.fullproductname,
Expand Down Expand Up @@ -192,7 +203,7 @@
stock_card_line_items.stockcardid
JOIN referencedata.facilities AS facilities ON facilities.id =
stock_cards.facilityid
JOIN referencedata.orderables AS products ON products.id =
JOIN latest_orderables AS products ON products.id =
stock_cards.orderableid
JOIN referencedata.programs AS programs ON stock_cards.programid =
programs.id
Expand Down Expand Up @@ -237,7 +248,7 @@
OR ($P{startDate} IS NULL AND $P{endDate} IS NULL)
)
)
SELECT
SELECT DISTINCT
facilityName,
productName,
productCode,
Expand Down
Loading