idea
Idea Brief: Invoice Line Item Recode Tool
Created: 2025-12-15 Author: Claude Code
Problem Statement (What)
Coordinators and suppliers manually recode invoice line items when categorization is incorrect:
- Line items are scattered across multiple items with wrong service types
- No bulk operations available - must edit each item individually
- No way to identify patterns of miscategorization
- Time-consuming process prone to human error
- No visibility into common recoding patterns
Current State: Edit line items one-by-one via modals; no batch processing or rule-based assistance
Possible Solution (How)
Xero-style recode interface with:
- Table view - All invoice line items in one place with sortable columns
- Multi-select - Checkbox selection of multiple items
- Common rules - Pre-built queries (e.g., “All items with ‘Physio’ in description”, “Items with category X but amount > Y”)
- Bulk recode - Apply new service category to all selected items at once
- Filtering - Filter by date, amount, description, current category
- Confirmation - Preview before bulk applying changes
Example:
// Before- 50 line items across 5 invoices with wrong categories- Manual edit each one: 50 clicks
// After- Click "Common rule: Physio items → Allied Health"- Auto-selects 12 matching items- Click "Recode all" → DoneBenefits (Why)
User Efficiency:
- Reduce recoding time from 30-45 minutes per invoice to 5-10 minutes (70% time saving)
- One-click bulk operations vs. 50+ individual clicks
Data Quality:
- Consistent categorization through rules engine
- Reduced manual error rate (visual confirmation before apply)
Visibility:
- Identify systematic categorization issues
- Audit trail for all recoding actions
Owner (Who)
Will (Product Owner) - Decision authority on feature scope and rules engine
Other Stakeholders
Accountable: Tim (Engineering Lead) - Implementation oversight Consulted: Coordinators (end users), QA team, Finance (impact on reporting) Informed: Support team, Jira management
Assumptions & Dependencies, Risks
Assumptions:
- Service categorization rules are defined and stable
- Common recoding patterns are identifiable upfront
- Bulk updates maintain audit trail via existing LogsActivity trait
Dependencies:
- BillItem model and ServiceType taxonomy must be stable
- Existing UpdateBillItem action can be leveraged
- Activity logging infrastructure already in place
Risks:
- HIGH → Bulk changes could affect financial reporting if rules are incorrect → Mitigation: Strict rule validation, QA review before launch
- MEDIUM → Performance if recoding large invoice batches (1000+ items) → Mitigation: Batch processing, progress indicators
- LOW → User confusion with new interface → Mitigation: Clear UI labels, tutorial/help text
Estimated Effort
Medium (2 sprints / 4-5 weeks)
- Sprint 1: Backend rules engine + API endpoints (rules, filtering, bulk update)
- Sprint 2: Frontend UI component (table, multi-select, rule builder)
Proceed to PRD?
YES - Clear user need, defined scope, leverages existing infrastructure. Ready for detailed specification.
Decision
- Approved - Proceed to PRD
- Needs More Information
- Declined
Approval Date: 2025-12-15
Next Steps
- Create PRD with detailed requirements
- Design rules engine data structure
- Create Xero-style mockups
- Break down into user stories
- Create implementation plan
Notes: This aligns with TP-1864 (Invoices V2) modernization efforts. Consider integration with invoice approval workflows downstream.