Overview
POS Kasir provides comprehensive reporting and analytics capabilities for business insights. The reporting system includes dashboard summaries, sales trends, product performance, payment method analytics, cashier performance, and cancellation tracking.Dashboard Summary
Get Dashboard Summary
Retrieve high-level overview metrics for the dashboard. Endpoint:GET /reports/dashboard-summary
Required Role: Admin, Manager, Cashier
internal/report/handler.go:304-328
Sales Reports
Get Sales Reports
Retrieve aggregated sales data grouped by date within a specified range. Endpoint:GET /reports/sales
Required Role: Admin, Manager, Cashier
internal/report/handler.go:29-82
start_date- Start date (YYYY-MM-DD) - Requiredend_date- End date (YYYY-MM-DD) - Required
Product Performance
Get Product Performance
Analyze sales performance for each product. Endpoint:GET /reports/products
Required Role: Admin, Manager, Cashier
internal/report/handler.go:84-137
Payment Method Performance
Get Payment Method Analytics
Analyze usage and revenue by payment method. Endpoint:GET /reports/payment-methods
Required Role: Admin, Manager, Cashier
internal/report/handler.go:139-192
Cashier Performance
Get Cashier Performance Report
Track individual cashier sales and order counts. Endpoint:GET /reports/cashier-performance
Required Role: Admin, Manager, Cashier
internal/report/handler.go:194-247
Cancellation Reports
Get Cancellation Analytics
Analyze order cancellations grouped by reason. Endpoint:GET /reports/cancellations
Required Role: Admin, Manager, Cashier
internal/report/handler.go:249-302
Profit Analysis
Get Profit Summary
Analyze gross profit grouped by date. Endpoint:GET /reports/profit-summary
Required Role: Admin, Manager, Cashier
internal/report/handler.go:330-383
Get Product Profit Report
Analyze profitability by product. Endpoint:GET /reports/profit-products
Required Role: Admin, Manager, Cashier
internal/report/handler.go:385-438
Report Handler Interface
internal/report/handler.go:13-22
Use Cases
Monthly Sales Review
Daily Performance Dashboard
Product Performance Analysis
Best Practices
- Date Range Limits - Restrict date ranges to prevent performance issues (e.g., max 1 year)
- Caching - Cache frequently accessed reports with short TTL
- Scheduled Generation - Pre-generate daily/weekly reports during off-peak hours
- Data Aggregation - Use database aggregations instead of application-level calculations
- Export Functionality - Provide CSV/PDF export options for reports
- Real-Time Updates - Use WebSocket for live dashboard updates
- Comparative Analysis - Show period-over-period comparisons (vs previous month/year)
- Visualization - Implement charts and graphs for better data interpretation
Performance Considerations
- Reports query large datasets, consider:
- Database indexing on date columns
- Read replicas for report queries
- Query result caching
- Pagination for large result sets
- Background job processing for heavy reports
Related Features
- Transactions - Transaction history and details
- Orders & POS - Order data used in reports
- Payments - Payment data analytics
- User Management - Cashier performance tracking