PO History had no way to narrow by accounting code. Add an "Accounting Code" filter (the shared type-to-search combobox) alongside Cost Centre, backed by the PO-level account already included in the query. - history/page.tsx: read `accountId` searchParam, fetch selectable leaf accounting codes (active, no children) via buildAccountGroups, apply `where.accountId`, thread the param into pagination + export links, and surface an Accounting Code column for context. - history-filters.tsx: new SearchableSelect control wired into buildParams/apply/clear/hasFilters like the Cost Centre select. - api/reports/export: apply the same `accountId` filter so CSV/PDF export respects the on-screen filter. - tests/staging: verify picking a code drives an `accountId` query param. Fixes #121 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| admin | ||
| approvals | ||
| catalogue | ||
| crewing | ||
| dashboard | ||
| history | ||
| inventory/cart | ||
| my-orders | ||
| payments | ||
| po | ||
| profile | ||
| reports | ||
| layout.tsx | ||