added local db

This commit is contained in:
2026-07-29 13:06:39 +05:30
parent d72522e737
commit d9886880cc
38 changed files with 2895 additions and 2261 deletions

View File

@@ -8,6 +8,7 @@ import '../../../domain/entities/transaction.dart';
import '../../../domain/usecases/checkout_sale.dart';
import '../../pos/providers/cart_controller.dart';
import '../../pos/providers/catalog_providers.dart';
import '../../sync/providers/sync_controller.dart';
/// UI state for the payment screen.
class PaymentState {
@@ -161,9 +162,11 @@ class PaymentController extends StateNotifier<PaymentState> {
unawaited(receipts.openCashDrawer());
unawaited(_ref.read(soundServiceProvider).saleComplete());
// Stock changed, so the grid must refresh.
// Stock changed, so the grid must refresh; the new order changes the
// unsynced tally and today's totals.
_ref.invalidate(allProductsProvider);
_ref.invalidate(visibleProductsProvider);
_ref.read(orderVersionProvider.notifier).state++;
return result;
} on CheckoutFailure catch (e) {