You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support deli/grocery-style weighted items. Stage 1 = scale-generated labels: many scales print barcodes that embed a PLU + weight/price. Stage 2 (separate, later) = direct HID/USB/serial scale reading. This issue covers stage 1.
Proposed configuration
Prefix 21
Product digits 5
Weight digits 5
Unit grams
Order creation already accepts positive numerical (non-integer) quantities (main/routes/orders.ts: quantity <= 0 || !Number.isFinite(quantity) is the only guard) — fractional order math is compatible.
Concrete inconsistency to fix: held orders require Number.isSafeInteger(item.quantity) (main/routes/held-orders.ts:45), so weighted quantities fail there.
Barcode lookup is exact and uniqueness-enforced server-side (main/routes/products.ts ~750/851); scanner hook is global/reusable.
Acceptance criteria
Weighted product metadata fields + migration; fractional quantity works end to end.
Scale-barcode parser (prefix/PLU/weight config) adds the weighted item with correct quantity/price.
Held orders accept fractional quantities for weighted products.
Stage 2 (zero/tare/stable reading from a real scale) tracked separately later.
Activity
test(barcode): run the scale-barcode regression for issue #365
test: make the suite capable of failing (Wave 0 test harness) (#860)