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

Errors re inventory levels falling below a given level should be based on whole bank, not just current storage location. #4647

Open
6 tasks
cielf opened this issue Sep 10, 2024 · 9 comments · May be fixed by #4804

Comments

@cielf
Copy link
Collaborator

cielf commented Sep 10, 2024

Summary

Change the comparison in inventory_check_service so that it compares across the whole bank rather than the current storage location

Why?

Per stakeholders, the quantities are not per storage location, but across the bank. Doesn't matter a lot for most banks, but consistent use of the values, comparing apples to apples.

Details

Recreation

log in as [email protected]
Look at the dashboard and pick an item from the bank-wide low inventory that is well above the minimum quantity. Note the minimum amount.
Then make a distribution (Distributions|New Distribution). You'll have to check for a storage location that has more than the minimum quantity (choose the storage location, then check the level shown on that item in the list.)
Make an entry that will reduce the amount in that storage location to just below the minimum amount (but wouldn't take the bank-wide level down below the minimum amount).
Save.
It will show the warning "The following items have fallen below the minimum on hand quantity".

What should happen

That warning should be shown only if the number available on that item falls below the minumum on hand quantity across the whole bank (i.e. The total across all the bank's storage locations is below the minimum quantity.)

Please also change the error message to begin: "The following items have fallen below the minimum on hand quantity, bank-wide: ", and make it show as a warning (black on yellow) rather than an error (white on red).

Hint: See set_error and set_alert in inventory_check_service for where this comes into effect.

Criteria for completion

  • error re minimum values correctly set
  • error re recommended values correctly set
  • existing tests modified if needed
  • tests added if not already there
  • warning message changed to "The following items have fallen below the minimum on hand quantity, bank-wide: "
  • warning message colour changed to our standard warning colour (blank on yellow) instead of white on red
@progGabo
Copy link

progGabo commented Oct 8, 2024

Hi, is this issue still available?

@cielf
Copy link
Collaborator Author

cielf commented Oct 9, 2024

It is -- I am assigning it to you.

@github-actions github-actions bot removed the Help Wanted Groomed + open to all! label Oct 9, 2024
Copy link
Contributor

github-actions bot commented Nov 9, 2024

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

Copy link
Contributor

Automatically unassigned after 7 days of inactivity.

@cielf cielf added Help Wanted Groomed + open to all! and removed stale labels Nov 16, 2024
@McEileen
Copy link
Contributor

Hi, could I please be assigned to work on this issue? I saw that the Help Wanted issue was recently added back to the issue. Thanks!

@cielf
Copy link
Collaborator Author

cielf commented Nov 16, 2024

It's yours!

@github-actions github-actions bot removed the Help Wanted Groomed + open to all! label Nov 16, 2024
@McEileen
Copy link
Contributor

Hi @cielf and team, I have a clarifying question about this issue.

What is the desired behavior when a distribution causes item1 to fall below the minimum quantity and item2 to fall below the recommended quantity? Do you want both the minimum quantity and recommended quantity error messages to display? (My expectation is yes, but I wanted to confirm.)

@cielf
Copy link
Collaborator Author

cielf commented Nov 26, 2024

Yes, please. Both give useful information. The more severe one (i.e. the minimum one) should show first (I think it does already)

@McEileen
Copy link
Contributor

That makes sense, thanks!

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