Skip to content

Commit

Permalink
Merge pull request #64 from OpenLMIS-Angola/OAM-293
Browse files Browse the repository at this point in the history
OAM-293: Update report angola_stock_on_hand_per_facility
  • Loading branch information
olewandowski1 committed Aug 6, 2024
2 parents dd38441 + 63580d6 commit b6f57ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions reports/angola_stock_on_hand_per_facility.jrxml
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,14 @@ FROM (
JOIN referencedata.facilities AS facilities ON facilities.id = stock_cards.facilityid
JOIN referencedata.programs AS programs ON programs.id = stock_cards.programid
JOIN referencedata.geographic_zones AS zones ON zones.id = facilities.geographiczoneid
JOIN referencedata.geographic_levels AS levels ON levels.id = zones.levelid
where
($P{program} IS NULL OR $X{IN, programs.name, programList})
AND ($P{district}::varchar IS NULL OR zones.id IN (SELECT id FROM findChildZones))
AND ($P{productId} IS NULL OR products.id = $P{productId}::uuid)
AND ($P{facility} IS NULL OR facilities.name = $P{facility}::varchar)
AND ($P{date} IS NULL OR soh.occurreddate::varchar <= $P{date}::varchar)
AND levels.levelnumber <> 4
) AS soh_data
WHERE soh_data.date_rank = 1 AND soh_data.product_version_rank = 1
GROUP BY soh_data.product, soh_data.zone, soh_data.facility]]>
Expand Down

Large diffs are not rendered by default.

0 comments on commit b6f57ae

Please sign in to comment.