added product import and billing integration

This commit is contained in:
2026-08-05 18:15:21 +05:30
parent 33b4337933
commit 6c0266c9c7
32 changed files with 889 additions and 457 deletions

View File

@@ -13,6 +13,18 @@ abstract class TransactionRepository {
Customer? updatedCustomer,
});
/// Reverses a sale still inside its cancellation window: deletes the order,
/// restores the stock it consumed, and puts an attached shopper's loyalty
/// balance back to what it was immediately before the sale.
///
/// Only valid before the bill has been offered to the back office — this
/// does not send a cancellation anywhere, it erases the sale as if it had
/// never happened locally.
Future<void> voidSale({
required SaleTransaction transaction,
required Map<String, double> stockMovements,
});
Future<List<SaleTransaction>> history({int limit = 50});
Future<SaleTransaction?> findByInvoice(String invoiceNumber);