added local db
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user