Skip to content

2.8.0

Released: TBD

Highlights

  • Six new financial analytics reports — ITBMS (VAT) liability, customer profitability, project profitability, inventory turnover & dead stock, AR collections, and a forward cash-flow forecast — the drill-down companions to the KPI dashboard shipped in 2.7.0. All computed from existing data; no new tables.

Added

  • itbmsLiabilityReport(dateFilter) — output tax collected vs input tax paid, net payable, and a per-rate breakdown.
  • customerProfitabilityReport(dateFilter, generateCsv) — per-client revenue, COGS, gross profit, margin, and invoice count.
  • projectProfitabilityReport(dateFilter, generateCsv) — per-project revenue, COGS, margin, and budget consumption.
  • inventoryTurnoverReport(dateFilter, deadStockDays, generateCsv) — per-item turnover ratio, days-on-hand, last-sale date, and a dead-stock flag.
  • arCollectionsReport(generateCsv) — per-client aging buckets, overdue %, oldest invoice age, amount-weighted average age, and avgDaysToPay (the client's historical invoice→receipt days).
  • arCollectionsEffectiveness(dateFilter) — period Collection Effectiveness Index (CEI), DSO, and the underlying beginning/ending AR, credit sales, and collections.
  • cashFlowForecast(startDate, weeks) — weekly inflow/outflow/running-balance projection from open AR/AP due dates and recurring invoices/expenses, with lowest balance and runway.
  • New GraphQL types: ItbmsLiabilityReport / ItbmsRateLine, CustomerProfitability, ProjectProfitability, InventoryTurnover, ArCollections, CashFlowForecast / CashFlowWeek (the paginated ones via GenericReportPageResponse). See Financial Analytics Reports.

Changed

  • Purely additive — no existing behaviour changed.

Fixed

  • N/A.

Migrations

  • None. Reports are computed from posted invoices, supplier invoices, expenses, inventory, recurring schedules, and the ledger cash balance. No new tables, no backfill, and no new RBAC Path (all six reuse Path.REPORTS).

Frontend impact

  • Paginated reports (customerProfitability, projectProfitability, inventoryTurnover, arCollections) return records + csvUrl; pass generateCsv: true to get an Excel download URL instead of rows.
  • itbmsLiabilityReport returns the three period totals plus a byRate breakdown.
  • cashFlowForecast returns weekly buckets (runningBalance to plot) plus runwayWeeks (null = no shortfall in the horizon) and lowestBalance / lowestBalanceWeekStart for the risk callout.
  • Money is Decimal; a null ratio/percent means "not computable" — render a dash.
  • arCollections rows now carry avgDaysToPay; arCollectionsEffectiveness returns the CEI headline (collectionEffectivenessIndex) plus its components. The CEI's endingCurrentAr comes from the live aging snapshot, so it's exact for windows ending at/near today and approximate for older windows.
  • Known gap (deferred): project operating expenses (no project_id on the ledger/expenses) — see the feature page's Future additions.

Versioning notes

  • Bumped with uv run python scripts/bump_version.py 2.8.0 --changelog-stub.
  • Deploy order: none — additive schema only, no migration. Builds on 2.7.0 (the Financial KPI dashboard); together they complete the two-part analytics push.