From cb3f13f76da5557eecdb8d8e9b4d461c8523b246 Mon Sep 17 00:00:00 2001 From: shad0w Date: Wed, 24 Jun 2026 05:54:40 +0000 Subject: [PATCH] docs(reports): weekly + custom compare + line-item allocation now implemented --- Reports-Mockup.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Reports-Mockup.md b/Reports-Mockup.md index 3d10b05..4a2b282 100644 --- a/Reports-Mockup.md +++ b/Reports-Mockup.md @@ -16,11 +16,11 @@ hierarchy. The core of this mockup is now **implemented** under **Reports → Purchasing** in the live app, wired to real approved-PO spend (not the sample data below): - **Cost Centres** (`/reports/cost-centres`) and **Accounting Codes** (`/reports/accounting-codes`), each with an index, drill-down, and detail view. -- Filters: **Granularity** (Monthly / Yearly), **Financial Year**, **Show** (Top 5 / Top 10 / Bottom 5 / All) — all URL-driven, so views are shareable/bookmarkable. +- Filters: **Granularity** (Weekly / Monthly / Yearly), **Financial Year**, **Show** (Top 5 / Top 10 / Bottom 5 / All) — all URL-driven, so views are shareable/bookmarkable. - KPI tiles, multi-series comparison charts, single-series trend charts, Top-N breakdowns (re-pivotable by tier / cost-centre / sub-account), per-row trend sparklines, and **CSV export**. - Gated by the `view_analytics` permission (Manager / SuperUser / Auditor / Admin). Cost centres are **vessels** (the PO cost centre); sites are not cost centres. -**Deferred** to a later pass: the synthetic **Weekly** granularity, the **“Add to graph”** custom multi-select comparison, and **line-item-level** account allocation (v1 attributes a PO’s whole amount to its PO-level accounting code). +**Now fully implemented**, including the pieces deferred in the first pass: the **Weekly** granularity (focuses one FY month, buckets by week-of-month, with a Month picker), the **“Add to graph”** custom multi-select comparison (tick rows → compare just the selected set, via a shareable `?sel=…&cmp=1` URL), and **line-item-level account allocation** (a multi-account PO is split proportionally across its line-item accounting codes, so the accounting-code report attributes it correctly). Code: `App/lib/reports.ts` (aggregation core + unit tests), `App/app/(portal)/reports/**` (pages), `App/components/reports/**` (toolbar + charts), `App/app/api/reports/spend/` (CSV export).