diff --git a/client/src/tablet/Sale.tsx b/client/src/tablet/Sale.tsx index 7bd0fab..0d1739a 100644 --- a/client/src/tablet/Sale.tsx +++ b/client/src/tablet/Sale.tsx @@ -122,8 +122,14 @@ export function Sale({ config, onChangeBar }: Props) { addDrink(d.id); } + // Positive n adds (works on any drink, cart-empty or not). Negative n + // removes — routed through incLine rather than addDrink so it shares + // the qty-stepper's clamp-at-zero-and-drop-the-line behaviour instead + // of letting a line go negative (addDrink's raw `qty + n` would). function pickCount(n: number) { - if (pickerDrink) addDrink(pickerDrink.id, n); + if (!pickerDrink) return; + if (n > 0) addDrink(pickerDrink.id, n); + else incLine(pickerDrink.id, n); setPickerDrink(null); } @@ -191,23 +197,43 @@ export function Sale({ config, onChangeBar }: Props) { )} - {pickerDrink && ( -