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
23 stars 14 forks source link

SOH columns of omSupply and mSupply (OG) are not calculated the same way #5433

Open alainsussol opened 2 weeks ago

alainsussol commented 2 weeks ago

What went wrong? 😲

mSupply OG include Total on hand https://drive.google.com/file/d/13QzBwFMstniwAvF5Yd-qZRAMRRaNMONQ/view?usp=sharing

omSupply include only available stock ie only the stock that have not be already allocated to the shipment of another customer for which the invoice has not been confirmed yet. https://drive.google.com/file/d/1Ufr_GJllxnlvb-WMwPqSH6Cz7FwgaIg0/view?usp=sharing

For example mSupply OG calculate 2406 for item AY02027 whcih is the sum of the stock of these 4 lines: https://drive.google.com/file/d/11ZvWYcmassW7RCogpK-jh-YHT-EnQXEl/view?usp=drive_link

But this line is the only one for which the Total stock is different from the available of stock https://drive.google.com/file/d/19vSCERZsgjt6TMmtzO2vjPGuw9hxQKHA/view?usp=sharing

Which seems to account for the difference between the omSupply and mSupply OG.

I have tried 1 other item (AY02028) and the difference also to corresponds to the difference between Total stock and available stock.

Expected behaviour 🤔

Values in mSupply OG and omSupply should be the same. I think that SOH should be the total stock on hand and not only the stock available but I might be wrong.

How to Reproduce 🔨

Steps to reproduce the behaviour: Migrate a store from mSupply OG to omSupply

  1. Go to Distribution > Requisition and choose a requisition with values in "our SOH"
  2. Compare with the values of the same requisition in mSupply OG
  3. See error

Your environment 🌱

roxy-dao commented 1 week ago

Should do what OG does