How vatanium-lite/minimartpos works
Moon Mart POS is a Windows desktop checkout and inventory application. A cashier scans or enters a barcode, manages cart quantities and a whole-sale discount, selects a payment label, and completes checkout; the application records the sale, deducts stock, and attempts receipt printing. Separate workflows manage products and stock and display a Bangkok-time business-day sales summary. The graph distinguishes UI orchestration, database operations, reporting, and receipt rendering/printing. Some subsystem links are documented in the README; unsampled implementation details are not inferred.
Main entry points: main.py POS window · db.py Sale recording · printer.py Receipt formatting
Components 16
POS interface
- POS window
main.py
Sales workflow
- Cart and totals
main.py - Checkout
main.py - Cash or KHQR
main.py
Products and stock
- Product editing
main.py - Stock forms
main.py
Database and reporting
- Sale recording
db.py - Batch deduction
db.py - Product operations
db.py - Stock operations
db.py - Business-day summary
db.py
Receipt output
- Receipt formatting
printer.py
Other components
- Cashier
- Barcode scanner
- SQLite database
- Windows ESC/POS printer
Connections 20
- Cashier → POS window: operates
README.md - Barcode scanner → POS window: enters barcode
README.md - POS window → Cart and totals: manages
main.py - Cart and totals → Checkout: submits
README.md - Cashier → Cash or KHQR: confirms payment
README.md - Cash or KHQR → Checkout: selects method
README.md - Checkout → Sale recording: records sale
README.md - Checkout → Batch deduction: deducts stock
README.md - Sale recording → SQLite database: writes transactions
db.py - Batch deduction → SQLite database: reads and updates batches
db.py - POS window → Product editing: opens forms
main.py - Product editing → Product operations: adds or edits products
README.md - POS window → Stock forms: opens forms
main.py - Stock forms → Stock operations: changes stock
README.md - Product operations → SQLite database: reads and writes products
db.py - Stock operations → SQLite database: reads and writes batches
db.py - POS window → Business-day summary: requests summary
README.md - Business-day summary → SQLite database: queries sales
db.py - Checkout → Receipt formatting: prints after commit
README.md - Receipt formatting → Windows ESC/POS printer: sends receipt
printer.py