Skip to content

Commit

Permalink
Update report angola_stock_on_hand_per_facility
Browse files Browse the repository at this point in the history
  • Loading branch information
mdulko committed Aug 6, 2024
1 parent 6139101 commit 63580d6
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 63580d6

Please sign in to comment.