msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
20 stars 12 forks source link

Include previous inventory-adjustments logs under Ledger even after all of existing stocks have been repacked? #4073

Open nishaDangol-Sussol opened 3 months ago

nishaDangol-Sussol commented 3 months ago

What went wrong? šŸ˜²

Is it possible to include previous inventory-adjustments under Ledger even after all of existing stocks have been repacked?

Expected behaviour šŸ¤”

can we include whole ledger despite of repacks (cause IMO previous logs like invads, shipments matter)?

How to Reproduce šŸ”Ø

Steps to reproduce the behaviour:

  1. Have/Create a SI with items' say 10 quan and status: delivered
  2. Under View Stocks, open that item.
  3. Adjust and maybe reduce some quan to like 8.
  4. See Ledger tab, and see that inventory-reduction log appears under Ledger
  5. Now this time repack
  6. Make sure to repack all existing stocks. Repack, let's say from pack-size 1 to now pack-size 2
  7. Right after repack, you'll see all the log under Ledger tab: there's record of both invad & repack
  8. Go back to View Stock window and select that item and see Ledger tab
  9. This time: the previous invad log is lost; just repacks log remains.
  10. Since they're complete new lines, it may be agreeable that invads are not there; but it feels weird, esp, if I compare it with mSuppy Ledger (which has detailed ledger). Plus, it also removes previous Inbound-shipment logs. still not buggish?

And one more for discussion maybe:

  1. Remember from Point 10., the pack-size is now 2
  2. For same item, create another adjustment.
  3. This time increase quan, let's say increase by 1 such that total SoH is now 10 [8(previous) +2(new)]
  4. See it's supplier: it's still the previous supplier-name despite the fact that 8 are from suppliers and 2 is from invad

Recordings Reference

https://github.com/msupply-foundation/open-msupply/assets/59193490/1eddf270-f04b-42ea-8031-c448b21c38dc

Your environment šŸŒ±

lache-melvin commented 3 months ago

Have had a chat about this with @regotaina - this is intended behaviour... if the stock line has been completely repacked, it no longer exists. The new stock line was "introduced" via repack, so we can't say it was introduced via inbound shipment.

Potentially at some point, it could be cool that if stock was introduced via repack, show a link to the previous stock line?

However, seeing the stale stock line data after closing the repack modal is pretty confusing. Like in the video, after you repack, you are still looking at the details page of the stock line that does not exist anymore! If you repack all packs, you should probably be redirected back to the list view (maybe after a dialogue popup explaining?)

nishaDangol-Sussol commented 3 months ago

Potentially at some point, it could be cool that if stock was introduced via repack, show a link to the previous stock line?

This one sounds good to me: show a link to previous stock lines with some hover text like This line was repacked from other line previously. Ledger of that line available at: Link to it's previous line

However, seeing the stale stock line data after closing the repack modal is pretty confusing. Like in the video, after you repack, you are still looking at the details page of the stock line that does not exist anymore! If you repack all packs, you should probably be redirected back to the list view (maybe after a dialogue popup explaining?)

Popup wouldn't be necessary if link to previous lines (after repacks) will be implemented I think

andreievg commented 3 months ago

Triage: Changing to feature request, it looks like mSupply does the same thing ? Adding needs design label and leaving priority for triage meeting