Scan quantity is missing or merging?
Same barcode alone is not enough. A later scan only adds quantity onto an existing line when it is the same product line in the same session for the same user, with every extra field matching.
Quantity merge (qty is added)
A new scan adds onto the existing local row when all of these match:
Then qty is summed: existing qty + this scan’s qty.
If any of those differ (different shelf, batch, expiry, location, another user, etc.), it is a new line, not a merge.
Edit is different: editing replaces qty on that row; it does not add.
Database: each confirm still inserts a new eyoyo_mlist row with that scan’s qty. The merge above is the on-device list. The server is not collapsing those rows into one transaction.
List card grouping (looks merged)
The inventory cards can show several rows as one card and sum qty even when they did not merge into one local row:
- Has stock ID
- Individual session: one card per session + stock ID + user
- Shared session: one card per session + stock ID (all participants on that product)
- No stock ID
- Same barcode and same store / location / shelf / expiry / batch / sale unit
- Individual: also split by user
- Shared: all users on that line are on one card
So: qty merge = same user + same session + same product + same location/shelf/batch/expiry/unit. Card merge can be wider, especially in a shared session when a stock ID exists.