Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAM-293: Update report angola_stock_on_hand_per_facility #64

Merged
merged 1 commit into from
Aug 6, 2024
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 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.

Loading