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

Improvements to the Stock Expiration Report #4835

Closed
jniles opened this issue Aug 19, 2020 · 2 comments · Fixed by #4920
Closed

Improvements to the Stock Expiration Report #4835

jniles opened this issue Aug 19, 2020 · 2 comments · Fixed by #4920
Assignees
Labels

Comments

@jniles
Copy link
Collaborator

jniles commented Aug 19, 2020

Here is what the stock expiration report looks like:

image

We can make a few improvements to this based on my conversations with Dr. Larry.

  1. Let's add a section at the top of this report that shows three large values:

    1. Current value of the stock
    2. Value of the stock in risk of expiry
    3. Value of the stock that is expired
      image
  2. The colors in the report are also hard to read. We should use a standard color scheme, like we have in the cashbox analysis report or the recover report:
    image

@jniles
Copy link
Collaborator Author

jniles commented Aug 27, 2020

@kwilu claim

@jniles
Copy link
Collaborator Author

jniles commented Aug 27, 2020

So, this report is confusing as implemented in BHIMA.

  1. The date range filters on the stock movement date. It doesn't filter on the expiration date.
  2. Why are we even filtering on dates? I'm pretty sure this should just give stock lots that have a remaining quantity that will expire soon.

I'm proposing to make the following changes:

I'll remove the dates. We should be looking at stock that is either:

  1. Expired
  2. At Risk of Expiring

What does "At risk of expiring" mean? It means that it is in the current depot the current CMM for this inventory item will not consume the stock rapidly enough to consume it all before it will expire.

jniles added a commit to jniles/bhima that referenced this issue Sep 14, 2020
This commit fixes the stock expiration report by doing the following
things:
  1. Removes the date range as these don't make any sense.
  2. Uses the same colorscheme as used in the other reports for
     warning/danger text.
  3. Adds total summaries to the top of the report.
  4. Removes the inventory select.
  5. Simplifies the queries so that less for loops are done.
  6. Fixes the currency bug so things render in the enterprise currency.
  7. Adds the column for the unit type.

Closes Third-Culture-Software#4835.
jniles added a commit to jniles/bhima that referenced this issue Sep 14, 2020
This commit fixes the stock expiration report by doing the following
things:
  1. Removes the date range as these don't make any sense.
  2. Uses the same colorscheme as used in the other reports for
     warning/danger text.
  3. Adds total summaries to the top of the report.
  4. Removes the inventory select.
  5. Simplifies the queries so that less for loops are done.
  6. Fixes the currency bug so things render in the enterprise currency.
  7. Adds the column for the unit type.

Closes Third-Culture-Software#4835.
bors bot added a commit that referenced this issue Sep 16, 2020
4920: fix(reports): stock expiration report r=lomamech a=jniles

This commit fixes the stock expiration report by doing the following
things:
  1. Removes the date range as these don't make any sense.
  2. Uses the same color scheme as used in the other reports for warning/danger text.
  3. Adds total summaries to the top of the report.
  4. Removes the inventory select.
  5. Simplifies the queries so that less for loops are done.
  6. Fixes the currency bug so things render in the enterprise currency.
  7. Adds the column for the unit type.

Closes #4835.

Here is what it looks like now:
![image](https://user-images.githubusercontent.com/896472/93102665-977ee780-f6a3-11ea-9b6b-c7fa03d1d582.png)


----

I chose not to implement the "total value in stock" since this would be a rather expensive query and probably only makes sense if we are looking at a single depot at a time.

Co-authored-by: Jonathan Niles <jonathanwniles@gmail.com>
@bors bors bot closed this as completed in 8135d8a Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants