pos changes

This commit is contained in:
2026-08-06 19:26:53 +05:30
parent cb065a0f69
commit eebd10da6d
42 changed files with 3451 additions and 2531 deletions

View File

@@ -208,10 +208,19 @@ class CartController extends StateNotifier<Cart> {
setQuantity(productId, line.quantity + by);
}
/// Steps a line down, never off the bill.
///
/// Floors at one deliberately. Taking the last unit away is a removal, and
/// removals go through the PIN gate on the close button — a stepper that
/// quietly reached zero was a way around it.
void decrement(String productId, {double by = 1}) {
final line = state.lineFor(productId);
if (line == null) return;
setQuantity(productId, line.quantity - by);
final next = line.quantity - by;
if (next < 1) return;
setQuantity(productId, next);
}
void removeLine(String productId) {