Accessing Reports
Navigate to Reportes from the main menu. The page displays:- Period selection toolbar
- Filter options for artist and payment method
- Transaction table (left)
- Sales chart (right)
Reports automatically refresh every 6 seconds to show the latest transactions.
Selecting Time Periods
Filtering Data
Refine your reports using the filter toolbar:By Artist
Tatuador dropdown (cbo_artist):
- Todos - All artists combined
- Individual artist names from active artists list
By Payment Method
Tipo de pago dropdown (cbo_payment):
- Todos - All payment types
- Efectivo - Cash only
- Tarjeta - Card only
- Transferencia - Transfer only
Filters apply to both the transaction table and the sales chart simultaneously.
Understanding the Transaction Table
The left panel shows detailed transaction records:Columns
- Fecha - Transaction date (dd/MM/yyyy format)
- Cliente - Client name (or ”—” if not linked)
- Monto - Amount in currency format ($X,XXX.XX)
- Pago - Payment method
- Tatuador - Artist who performed the service
Data Source
Transactions come from thetransactions table, joined with:
tattoo_sessions- For session detailsclients- For client namesartists- For artist names
Reading the Sales Chart
The right panel displays an interactive line chart:Chart Features
- X-Axis - Dates in dd/MM format
- Y-Axis - Sales amounts with $ formatting
- Lines - One per artist (filtered by selection)
- Colors - Match artist colors from
artist_colors.json - Legend - Bottom-aligned, horizontal layout
- Points - Visible markers on each data point
Chart Behavior
Multiple Artists
Multiple Artists
When “Todos” is selected, each artist gets their own colored line showing daily sales.
Single Artist
Single Artist
When one artist is selected, only their line appears with full detail.
No Data
No Data
Artists with zero sales in the period are excluded from the chart to reduce clutter.
Long Periods
Long Periods
For ranges over 14 days, X-axis labels rotate -45° to prevent overlap.
Artist Colors
Chart line colors are determined by:artist_colors.jsonentry by ID (as string key)artist_colors.jsonentry by name- Fallback color palette (10 colors cycling)
The system auto-detects changes to
artist_colors.json every 2.5 seconds and updates chart colors without refreshing.Total Display
The chart header shows:- Period label - “Hoy”, “Esta semana”, “Este mes”, or date range
- Total - Sum of all filtered transactions in bold
Exporting Reports
Permission Levels
Admin
- View all artist reports
- Export without restrictions
- Access full date ranges
Artist
- View only their own transactions
- Artist filter locked to their name
- Can export their data
Assistant
- View all reports
- Must elevate privileges (enter admin password) to export
- Full date range access
The export button is only enabled for roles: admin, assistant, and artist.
Auto-Refresh Behavior
The reports page uses two timers:Data Refresh (Every 6 Seconds)
- Re-queries transactions from database
- Updates artist list (handles new/deactivated artists)
- Refreshes table and chart
- Maintains filter state
Color Refresh (Every 2.5 Seconds)
- Detects changes to
artist_colors.json - Reloads color map
- Updates chart line colors
- No database query
Financial Metrics
Calculating Totals
Commission Tracking
While not displayed in the Reports page, transaction records include:commission_amount- Calculated from payment dialogcommission_pct- Percentage applied
- Direct database queries
- Custom SQL reports
- Export and analyze in Excel
Best Practices
Daily Reviews
Check today’s report at end of day to verify all payments were recorded.
Weekly Analysis
Review weekly trends to identify busy periods and optimize scheduling.
Monthly Exports
Export monthly reports for accounting and tax purposes.
Artist Comparison
Use the “Todos” filter to compare artist performance side-by-side.
Troubleshooting
Chart not showing
Chart not showing
Verify QtChart is installed. The system gracefully degrades if charts are unavailable. Check that there are transactions in the selected period.
Wrong artist color
Wrong artist color
Ensure
artist_colors.json exists in the data directory. Keys must be strings (“1” not 1). The file is monitored automatically.Export fails
Export fails
Check file system permissions in the save location. For assistants, verify admin password is correct.
Missing transactions
Missing transactions
Confirm date filters are correct. Check that transactions have proper artist_id values. Verify you’re not filtered to a single artist.
Auto-refresh not working
Auto-refresh not working
The page only refreshes when visible. Switch to Reports tab to activate timers. Check database connection if data seems stale.