How pisethprom-dk/fll_pos_api works
This is a Django/DRF backend for a retail point-of-sale shop. The main workflow is staff authentication, product/customer lookup, quotation or invoice creation, payment and sale completion; posting a sale updates stock and preserves its cost and exchange rate. Other major areas include company configuration, partner records, stock documents and reports. The README documents the API capabilities; some view-to-service wiring and unsampled subsystems are not shown, so those links are omitted rather than inferred.
Main entry points: sales/services.py Sales workflows · reports/services.py Report calculations · inventory/services.py Stock posting and ledger · company/services.py Rates and numbering
Components 24
Access and API
- User and auth API
users/views.py - Token lifecycle
users/tokens.py - Role scopes
users/scopes.py
Shop Setup
- Company API
company/views.py - Rates and numbering
company/services.py - Currency rules
company/currency.py - Company settings
company/models.py
Retail Records
- Catalogue API
catalogue/views.py - Products and categories
catalogue/models.py - Demo catalogue data
catalogue/demo_data.py - Partner API
partners/views.py - Customers and suppliers
partners/models.py
Sales and Stock
- Sales API
sales/views.py - Sales workflows
sales/services.py - Sale calculations
sales/money.py - Sales documents
sales/models.py - Inventory API
inventory/views.py - Stock posting and ledger
inventory/services.py - Stock documents
inventory/models.py - Domain errors
core/exceptions.py
Reporting
- Reports API
reports/views.py - Report calculations
reports/services.py - Warranty records
warranty/models.py
Other components
- Shop staff
Connections 21
- Shop staff → User and auth API: authenticates
README.md - User and auth API → Token lifecycle: uses tokens
- Shop staff → Company API: configures shop
README.md - Shop staff → Catalogue API: looks up products
README.md - Demo catalogue data → Products and categories: creates demo rows
catalogue/management/commands/seed_demo.py - Shop staff → Partner API: manages partners
README.md - Shop staff → Sales API: handles sales
README.md - Shop staff → Inventory API: manages stock
README.md - Shop staff → Reports API: requests reports
- Rates and numbering → Company settings: reads counters
company/services.py - Rates and numbering → Currency rules: converts currency
company/services.py - Sales workflows → Stock posting and ledger: posts movements
sales/services.py - Sales workflows → Rates and numbering: takes numbers
sales/services.py - Sales workflows → Sale calculations: settles tenders
sales/services.py - Sales workflows → Sales documents: updates documents
sales/services.py - Stock posting and ledger → Stock documents: writes ledger
inventory/services.py - Report calculations → Sales documents: reads sales
reports/services.py - Report calculations → Stock documents: reads stock
reports/services.py - Report calculations → Warranty records: reads warranty
reports/services.py - Sales workflows → Domain errors: raises rule errors
core/exceptions.py - Stock posting and ledger → Domain errors: raises rule errors
core/exceptions.py