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

Add warning for intervening audits on distribution edit #4026

Merged
merged 3 commits into from
Jan 14, 2024
Merged

Conversation

dorner
Copy link
Collaborator

@dorner dorner commented Jan 12, 2024

As per discussion in Slack about the confusion around distribution edits.

The assumption when editing a distribution is that it actually represents movement of goods - in other words, the distribution was set up, but when it actually happens, the things that move around are different (e.g. the partner asks for more things or doesn't want as much).

If this isn't the case - if the person editing actually means to correct an administrative error - this can cause inventory issues if there was an intervening audit. The audit forces the inventory quantity to a particular amount, and editing the inventory will actually do a diff of the current and previous values and increase/decrease by that amount. This makes sense if it represents movement of goods, but not if it represents fixing an error.

This PR adds a warning when editing a distribution with an intervening audit indicating that inventory might be messed up in this case, and asking them to adjust it after the fact.

How Has This Been Tested?

Local and unit testing.

Screenshots

image

@dorner dorner requested a review from cielf January 12, 2024 20:48
@cielf cielf merged commit ac3861c into main Jan 14, 2024
12 checks passed
@cielf cielf deleted the audit-warnings branch January 14, 2024 16:24
Copy link
Contributor

@dorner: Your PR Add warning for intervening audits on distribution edit is part of today's Human Essentials production release: 2024.01.21.
Thank you very much for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants