rubyforgood / human-essentials

Human Essentials is an inventory management system for diaper, incontinence, and period-supply banks. It supports them in distributing to partners, tracking inventory, and reporting stats and analytics.
https://humanessentials.app
MIT License
436 stars 450 forks source link

Show inventory history for pre-event read #4469

Open dorner opened 1 week ago

dorner commented 1 week ago

Fix for #4433 .

This will show inventory history regardless of whether the time selected had events active or not. If the time is before events were active, it will use inventory item versions (using paper_trail).

cielf commented 6 days ago

Hey @awwaiid I'll be reviewing this functionally tomorrow (hopefully pre-meeting). I fully expect it to work. Could you do a technical review in parallel?

cielf commented 5 days ago

Looks like it works, ish-- the totals are wrong, and they are wrong for everyone on the production branch as well - i suspect it's just showing the current total inventory and that it has always been wrong but haven't looked into it. That is out of scope for this issue, I guess, but I would not be at all averse to including a fix for that in. (but am adding a proto issue)

dorner commented 5 days ago

Fixed for the events_read cases (both within event time and before it).

cielf commented 4 days ago

LGTM. Waiting for @awwaiid's review.