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

customer-credit from OG should not be mapped as outbound-return #4271

Closed nishaDangol-Sussol closed 3 months ago

nishaDangol-Sussol commented 3 months ago

What went wrong? 😲

Existing returns to oms-stores are mapped incorrectly after migration

Expected behaviour 🤔

customer-credit from OG should not be mapped as outbound-return

How to Reproduce 🔨

Steps to reproduce the behaviour:

  1. Have two setups in sync: one oms-storeA and one OG desktop-storeB
  2. From oms-storeA, create a outbound-return(supplier-credit) to desktop-storeB. Confirm shipped and sync
  3. In desktop-storeB, receive that as customer-credit(inbound-return).
  4. Do nothing. Don't finalise
  5. Just make sure, till this point desktop is all synced.
  6. Now migrate desktop-storeB to oms, i.e., reset hardware ID's from cloud and re-initialise storeB completely
  7. Login to newly migrated oms-storeB
  8. Check Inbound returns(customer-credits)
  9. See error: the return is missing
  10. Check Outbound returns(customer-credits); see another error: cc is showing as outbound-return
  11. Why not also check the original outbound-return from oms-storeA to realise both there oms-stores have only outbound-returns here.

Your environment 🌱

andreievg commented 3 months ago

Triage, needs to investigate and fix in 2.1 if possible or early 2.2

roxy-dao commented 3 months ago

om_type is OutboundReturn but type is cc? (Before syncing)

roxy-dao commented 3 months ago

4331

nishaDangol-Sussol commented 3 months ago

Tested in v2.1.0-rc6. cc are mapped correctly now - PASS