Reports (Operational)
Written April 2026 — read this first
Reports now aggregate in the database and fail loudly rather than truncating — an export that cannot be proven complete throws instead of returning a short file (PLT-050). For the finance catalogue and what each report is dated by, read Finance reports and Lists, paging and search.
Top-level operational reports hub — CSV exports of bookings, customers, inventory P&L, visa/ticket/hotel status snapshots.
Operational vs financial reports
This page (/reports) is for operational snapshots. Double-entry financial reports (Trial Balance, Balance Sheet, Profit & Loss, GST Summary, Aging, Day Book, Receivables/Payables, Settlements, Stock Status) live under Finance → Reports. See docs/features/finance/reports.md for the finance catalog.
Page
src/pages/reports/Reports.tsx— report dashboard at/reports. Includes an inline Inventory P&L viewer (driven by local state, not a separate route).
Route (src/App.tsx:177):
<Route path="/reports"
element={<ProtectedRoute requiredPermissions={['reports.view']}>
<Reports />
</ProtectedRoute>} />
Report catalog
Defined in reportCategories (Reports.tsx:40). All CSV exports go through downloadCsv() from src/services/reportService.ts.
Booking Reports
| Report | Service fetcher | Content |
|---|---|---|
| Bookings Summary | fetchBookingsSummaryReport() |
Overview of all bookings by period |
| Group Occupancy | fetchGroupOccupancyReport() |
Capacity utilisation per group |
| Booking Pipeline | fetchBookingPipelineReport() |
Bookings by lifecycle stage |
Financial Reports (operational angle)
| Report | Service fetcher | Content |
|---|---|---|
| Revenue Report | fetchRevenueReport() |
Total revenue and collections |
| Outstanding Balances | fetchOutstandingBalancesReport() |
Pending payments by customer |
| Agent Commissions | fetchAgentCommissionsReport() |
Commission payable to agents |
| Inventory P&L | GET /inventory/pnl |
In-page drill-down (airline blocks, individual (FIT) seats, hotels, food/meals) with cost, revenue, utilisation %, P&L. The FIT section is INV-025; its seat figures come from the counters the database maintains and its cost is the paid seats only (AIR §15). A departure drawing on two records has its booking revenue counted on both rows — this is a margin-per-record view, not an allocation. |
Inventory P&L is a viewer, not a CSV
Selecting Inventory P&L does not download a file — it swaps the view to an inline detail page (activeView === 'inventory-pnl', Reports.tsx:211) with three tables and a back button.
Operations Reports
| Report | Service fetcher | Content |
|---|---|---|
| Visa Status Report | fetchVisaStatusReport() |
Visa applications by status |
| Ticket Issuance | fetchTicketIssuanceReport() |
Tickets issued and pending |
| Hotel Allocation | fetchHotelAllocationReport() |
Room assignments and availability |
Customer Reports
| Report | Service fetcher | Content |
|---|---|---|
| Customer Directory | fetchCustomerDirectoryReport() |
All registered customers |
| Special Assistance | fetchSpecialAssistanceReport() |
Customers requiring assistance |
| Repeat Customers | fetchRepeatCustomersReport() |
Customers with multiple bookings |
Quick-stats band
Top of the page shows four tiles from fetchReportDashboardStats():
- Total Bookings
- Active Groups
- Visa Pending
- Tickets Issued
Custom Report Builder
A placeholder card at the bottom of /reports with CTA Create Custom Report. Wired to the 'Custom' case in handleReportDownload() which currently returns toast.info('Report download is not implemented yet') — the UI is live but the backend is not.
Permissions
| Action | Permission | Enforcement |
|---|---|---|
View /reports |
reports.view |
Route guard |
| Download any CSV | reports.export |
<PermissionGate> wrapping each row's Download button (Reports.tsx:467) |
| Inventory P&L viewer | reports.export |
Same gate (the button routes to the inline viewer) |
| Custom Report Builder | reports.export |
Gate present; backend not implemented |
Related
- Finance-side double-entry reports (Trial Balance, P&L, GST, Aging, etc.) →
docs/features/finance/reports.md. - Inventory module source of truth for P&L inputs →
docs/features/airline-blocks.md,docs/features/hotels.md. - Visa pipeline report source →
docs/features/visa.md.