added product import and billing integration
This commit is contained in:
@@ -146,6 +146,18 @@ class LocalStore {
|
||||
String? get catalogueRevision => _catalogueRevision;
|
||||
int get unsyncedOrders => _unsyncedOrders;
|
||||
|
||||
/// Drops the imported catalogue from disk and from the in-memory cache.
|
||||
///
|
||||
/// Called at sign-out so the next shift never bills against a copy left
|
||||
/// over from this one — [hasCatalogue] goes back to false, and the only way
|
||||
/// to sell again is a fresh pull from the back office.
|
||||
Future<void> clearCatalogue() async {
|
||||
await catalogue.clearCatalogue();
|
||||
_products.clear();
|
||||
_lastImportAt = null;
|
||||
_catalogueRevision = null;
|
||||
}
|
||||
|
||||
Future<void> importCatalogue({
|
||||
required List<Product> products,
|
||||
required List<Customer> customers,
|
||||
|
||||
Reference in New Issue
Block a user