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

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

Open
alainsussol opened this issue Nov 17, 2024 · 5 comments
Open
Assignees
Labels
bug Something is borken Severity: High Bugs breaking core functionality or with no/unacceptable workaround. High impact. Next patch release Team Korimako Laché, Aimee, Noel John, and Zachariah
Milestone

Comments

@alainsussol
Copy link

alainsussol commented Nov 17, 2024

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 🌱

  • Open mSupply Version: 2.4.0RC1
  • Legacy mSupply Central Server Version: v19-0RC27
  • Platform: Android
  • Database type: SQLite3
@alainsussol alainsussol added bug Something is borken needs triage needs daily triage New bug to be triaged by the release team feature: manual requisition labels Nov 17, 2024
@alainsussol alainsussol mentioned this issue Nov 17, 2024
46 tasks
@alainsussol alainsussol changed the title After migrating a store, there is some discrepancies between the values of Our SOH columns of omSupply and mSupply (OG) SOH columns of omSupply and mSupply (OG) are not calculated the same way Nov 18, 2024
@Chris-Petty Chris-Petty added Needs refinement and removed needs daily triage New bug to be triaged by the release team labels Nov 19, 2024
@roxy-dao
Copy link
Contributor

Should do what OG does

@andreievg andreievg added Severity: Normal Bugs which have an acceptable workaround. Moderate/tolerable user impact. Next minor release. and removed needs triage Needs refinement labels Nov 20, 2024
@andreievg andreievg added this to the v2.5.0 milestone Nov 20, 2024
@andreievg andreievg added Severity: High Bugs breaking core functionality or with no/unacceptable workaround. High impact. Next patch release and removed Severity: Normal Bugs which have an acceptable workaround. Moderate/tolerable user impact. Next minor release. labels Nov 20, 2024
@andreievg andreievg added good first issue Good for newcomers Team Korimako Laché, Aimee, Noel John, and Zachariah labels Dec 11, 2024
@andreievg
Copy link
Collaborator

Triage, I think we have total in api now for item stats, so should be reasonably simple, but may require a little bit of back end work on requisition line creation

@lache-melvin lache-melvin removed the good first issue Good for newcomers label Dec 15, 2024
@GeronimoJohn GeronimoJohn self-assigned this Dec 18, 2024
@lache-melvin
Copy link
Contributor

The Our SOH column currently displays itemStats.availableStockOnHand

itemStats currently doesn't include totalStockOnHand - this was rolled back. Blocked pending implementation decision 🙏

@mark-prins
Copy link
Collaborator

I went rogue and added #5906 - haven't made any changes for requisitions though. there's also a TODO to address re total stock in requisition lines.

@lache-melvin
Copy link
Contributor

itemStats now includes (total)stockOnHand! Per Marks comment, will need to implement getting total_stock_on_hand in from_requisition_line in server/service/src/item_stats.rs

@lache-melvin lache-melvin modified the milestones: v2.5.0, v2.6.0 Jan 6, 2025
@GeronimoJohn GeronimoJohn self-assigned this Jan 7, 2025
@GeronimoJohn GeronimoJohn modified the milestones: v2.6.0, v2.5.0 Jan 7, 2025
@roxy-dao roxy-dao modified the milestones: v2.5.0, V2.5.0-RC1 Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is borken Severity: High Bugs breaking core functionality or with no/unacceptable workaround. High impact. Next patch release Team Korimako Laché, Aimee, Noel John, and Zachariah
Projects
None yet
Development

No branches or pull requests

7 participants