Reports & Metrics¶
Backend domains:
- app/graphql/reports/ — operational and accounting reports
- app/graphql/metrics/ — landing-page KPIs and time-series
- app/graphql/home/ — home dashboard
RBAC Path: REPORTS.
Reports¶
reports/ ships a wide catalogue of operational and financial reports, each as a dedicated GraphQL query. They share a common pattern: parameters (date range, currency, filters) in, a typed response out, an optional PDF/CSV export via getReportPresignedUrl (see mcp notes).
Key queries by family:
Sales / receivables
invoiceRegisterReport,orderRegisterReport,quoteRegisterReportagedReceivableReport,agedReceivableReportSummaryclientStatement,clientStatementPdfpaymentMethodReport
Purchases / payables
supplierInvoiceRegisterReport,purchaseOrderRegisterReport,supplierQuoteRegisterReportagedPayableReport,agedPayableReportSummaryexpenseRegisterReport,expenseCategoryReport
Inventory & items
itemInvoiceDetailReport,itemSupplierInvoiceDetailReport,itemPurchaseOrderDetailReportitemCategoryPurchaseOrderReport,itemCostReportinventoryInsightsReportgetItemPurchasesReport,getItemOrdersReport
Financial statements
incomeStatementdetailedBalanceSheetdetailedTrialBalancecashFlowStatement
Configurable / saved reports
reports,reportConfigs,createReportConfig,deleteReportConfig— let users save filter sets and re-run them.
PDF rendering goes through app/graphql/pdf/ and is templated via app/graphql/pdf_templates/.
Metrics¶
metrics/ powers the landing-page widgets and dashboard KPIs.
Key queries: findLandingPages, findLandingPageKpis, getAmountsReport, getStatusAmountsReport, getTimeSeriesReport, getGroupedTimeSeriesReport, getTopEntitiesReport, getEntityCountsReport, getNetIncomeKpi.
These are designed to be cheap to render (pre-aggregated where possible) and parameterised by entity type + date range, so the same widget can show "Top 5 clients this month" or "Top 5 suppliers YTD".
Home dashboard¶
app/graphql/home/ composes the per-role landing page from metrics/ queries. A PYME owner, accountant, salesperson, and warehouse manager each see a different default set of widgets — these defaults live in code today and are good candidates for a "dashboard builder" UI.
What's missing / candidates¶
- Saved schedule + email delivery on any report (e.g. "send me the aged receivable every Monday").
- Drill-down from a KPI tile straight into the underlying transactions.
- Excel export with pivot-friendly formatting (CSV exists).
- Comparison vs. budget on the income statement (data is there; report is not).
- Per-project / per-cost-centre P&L (data captured, report not surfaced).