human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

Add Inventory Flow tab with quantity tracking and date filtering

Open AlexeyKasianenko opened this issue 4 months ago • 13 comments

Resolves #5249

Description

Quantity in has donations, purchases, adjustments that increase the inventory. Quantity out has distributions and adjustments that decrease the inventory

Kit allocations result in quantity in for the kit, and quantity out for the components

See the current Inventory In and Inventory Out tabs for details

Change is Quantity In minus Quantity Out. Negatives are presented in red.

Include anything else we should know about. -->

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

go to /storage_locations page

Screenshots

image

AlexeyKasianenko avatar Aug 11 '25 13:08 AlexeyKasianenko

notes for my functional testing (which won't be until at least tomorrow): beyond basic checks, check what happens if we try to go back before the first snapshot. Are we already constraining this / should we be and how are we communicating that otherwise. (this may require using prod data to test well) (Note: thinking about it - if we base this on eventables (which is probably the best bet ) we should constrain it to start no earlier than the first snapshot)

cielf avatar Aug 11 '25 23:08 cielf

@AlexeyKasianenko Thank you for this! I'm going to add things I notice here on-the-go while I test. I'm not looking at the code, just trying out the functionality.

cielf avatar Aug 12 '25 16:08 cielf

1/ First thing is that I'm afraid the performance is slow. I'm checking it with the production data for one of active bank. Using the production branch, the storage location view comes up in 4 seconds, on your current branch it takes 89 seconds.

cielf avatar Aug 12 '25 16:08 cielf

2/ You're showing items that aren't on the inventory in / out tabs (again, this is testing with production data). I'm about 90% sure that they don't show inactive items, if so you should do the same.

cielf avatar Aug 12 '25 16:08 cielf

3/ If I update the date range and click "filter", it's going back to the first tab. This is potentially confusion/annoying for our users. Let's have it stay on the same tab.

cielf avatar Aug 12 '25 16:08 cielf

4/ The current "all time" is not working properly (with all time, in plus out should equal inventory on the first page) with production data. However, I want to check with the senior team about whether we should just constrain the date range-- i suspect that's going to make sense.

cielf avatar Aug 12 '25 16:08 cielf

5/ When I did a "this year" in the date range, and filtered (with production data), when I returned to the page there was only one item. I know there are more. I'll try to recreate that with the seed data. (Edit: no immediate luck -- I'll need to poke further on this one)

cielf avatar Aug 12 '25 16:08 cielf

@awwaiid I would counter that we want to hard-wire that the start date can be no earlier than 2024-09-01. I, for one, don't want to have to work more than a full year of data if I'm checking into something that happened 2 weeks ago.

cielf avatar Sep 10 '25 13:09 cielf

Hmmm.
To start testing this out, signed in as [email protected], I made a donation of 22 Adult Briefs (Medium/Large) to Bulk Storage Location.

Screenshot 2025-09-25 at 5 08 36 PM

I then went to the Inventory Flow tab, and selected the date range "Today". I expected that there would be an entry for Adult Briefs (Medium/Large) with Quantity In of 22. There was not. Screenshot 2025-09-25 at 5 09 39 PM

cielf avatar Sep 25 '25 21:09 cielf

Hey @cielf. Fixed that

AlexeyKasianenko avatar Sep 26 '25 14:09 AlexeyKasianenko

Hey, @cielf , we discussed with stakeholders on Wednesday and they said that it makes sense to include adjustments, so that all totals are represented

ruestitch avatar Oct 03 '25 17:10 ruestitch

@AlexeyKasianenko ok ONE more change! Everything looks good, but we forgot to include the Audit event type. Could you add that in too? I manually verified that all the other cases work great.

awwaiid avatar Oct 19 '25 14:10 awwaiid

@awwaiid added Audits

AlexeyKasianenko avatar Oct 27 '25 14:10 AlexeyKasianenko