TJK: Add AMC (Average Monthly Consumption) column to stock requests#19
Open
deeonwuli wants to merge 8 commits into
Open
TJK: Add AMC (Average Monthly Consumption) column to stock requests#19deeonwuli wants to merge 8 commits into
deeonwuli wants to merge 8 commits into
Conversation
…low spec files - Introduced a read-only AMC column beside Demand on the Requisition create and edit pages. - Computed AMC using consumption transactions only, scoped to the requesting location. - Implemented feature flag `openboxes.custom.consumption.showAmcInRequisition` to control visibility. - Ensured AMC calculation aligns with the Consumption Report formula. - Updated relevant services and frontend components to support the new feature.
…tion in requisition process
…Consumption (AMC) for product selection in requisition process
gqcorneby
reviewed
Jun 25, 2026
gqcorneby
left a comment
There was a problem hiding this comment.
Thanks @deeonwuli! Great job 👏 Tested with seeded values and everything works great.
One minor comment to add translations and to archive the specs. Thanks!
Also noting for @bhavananarayanan, the screens affected are
- create request > add item step
- edit request after approval by fulfilling location
An oubound created via Outbound > Create Oubound > Edit step is not included though it has a Demand column.
| dhis2auth.breakout.message=Redirecting to sign in… | ||
| dhis2auth.breakout.link=Continue to sign in | ||
|
|
||
| # amc-in-requisition (custom) |
There was a problem hiding this comment.
Can we also add the new keys and the corresponding translations to messages_ru.properties and messages_tg.properties? We mainly rely on AI for the translation 😅
There was a problem hiding this comment.
I'm thinking if we should use "AMC" and just translate the tooltip?
Move completed change to archive/2026-06-26-amc-in-requisition and promote its delta spec to openspec/specs/amc-in-requisition.
Label kept as 'AMC' (recognized acronym); tooltip localized to ru/tg.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 References
📝 Implementation
total ÷ windowDays × 30formula and rolling window as the Consumption Report, so the two reconcile 1:1org.pih.warehouse.custom.consumptionDemand(backend) andsrc/js/custom/amcInRequisition(frontend); upstream edits are surgical and documented in the OpenSpecdesign.md🧪 Testing
Σqty ÷ windowDays × 30on both the create and edit screensshowAmcInRequisition: false→ AMC column hidden on both screens; set totrue→ column visible📸 Screenshots & Recordings (optional)
#869ctkw25