Commit Graph

8 Commits

Author SHA1 Message Date
AJ
51a51f9b27 Config: add Claude Code auto-approve permissions
Add auto-approve permissions for roslyn-bridge skill, curl commands, and dotnet build variants to improve Claude Code workflow efficiency.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 22:54:10 -04:00
AJ
86b7312dd6 Refactor: rename OpenAIReceiptParser to AIReceiptParser
Rename to reflect multi-provider support (OpenAI + Anthropic):
- Rename Services/OpenAIReceiptParser.cs to Services/AIReceiptParser.cs
- Update class name from OpenAIReceiptParser to AIReceiptParser
- Update DI registration in Program.cs

The parser now supports both OpenAI and Anthropic models, so the more generic name better reflects its capabilities.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 16:19:27 -04:00
AJ
3b175753f4 Add due date support for bills and utility receipts
Enhanced receipt parsing and mapping to support bills with due dates (like utility bills):
- Updated OpenAI prompt to extract due date from bills
- Added DueDate property to Receipt model with database migration
- Modified auto-mapping logic to use bill date to due date range when both dates are present
- For regular receipts without due dates, continues to use ±3 day window
- Updated manual mapping UI to display due dates and adjust date range explanation
- Receipt list now shows due dates in orange "Due:" text for clarity

This allows electric bills and similar documents with 20+ day payment windows to be properly matched to their payment transactions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 14:52:44 -04:00
AJ
cd7ca679ac Improve receipt mapping with smart filtering and table UI
Enhanced the receipt mapping modal with intelligent transaction filtering
and a clean table-based selection interface.

Smart Filtering (per receipt):
- If receipt has a date: Show transactions within ±3 days
- If receipt has merchant: Filter by merchant name match
- Calculate amount matches (within $0.10 tolerance)
- Only show transactions without receipts
- Limit to 50 most recent matches
- Fallback to recent 50 transactions if no matches

UI Improvements:
- Replaced confusing listbox with formatted data table
- Proper column alignment with fixed widths
- Sticky header for scrollable table (max 400px height)
- Clickable rows with radio button selection
- Visual feedback:
  - Green highlight for amount matches
  - Blue highlight for selected row
  - Hover effect on rows
- Context-aware helper text explaining filter criteria
- Shows which transactions match the receipt date range

Features:
- Click anywhere on row to select
- Radio buttons for explicit selection
- Hidden input field stores selected transaction ID
- Manual ID entry still available as fallback
- Clear visual indicators for best matches

This provides a much better UX for manual mapping by showing only
relevant transactions and making it easy to identify likely matches.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 13:31:14 -04:00
AJ
a5bda6f94f Fix naming conflict in ReceiptAutoMapResult
Renamed static factory method from 'MultipleMatches' to
'WithMultipleMatches' to avoid conflict with the 'MultipleMatches'
property in the same class.

This resolves the compilation error: "The type 'ReceiptAutoMapResult'
already contains a definition for 'MultipleMatches'".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 13:13:09 -04:00
AJ
1aecbf14fe Fix decimal precision for CategoryMapping.Confidence field
Add explicit column type configuration for Confidence field to avoid
SQL Server truncation warnings. Use decimal(5,4) to store values from
0.0000 to 1.0000 with 4 decimal places of precision.

Also add MaxLength constraint for CreatedBy field.

Migration applied successfully to database.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 10:51:47 -04:00
AJ
a44b3d41ac Major refactor: Split Cards and Accounts into separate tables
Schema Changes:
- Add Account model (Institution, AccountType enum, Last4, Owner, Nickname)
- Add Transfer model for tracking money movement between accounts
- Update Transaction to support both CardId and AccountId (nullable FKs)
- Rename Transaction.CardLast4 → Last4 (works for both cards and accounts)
- Add PaymentMethodLabel computed property to Transaction
- Create EF Core migration: SplitCardsAndAccounts

Data Model Improvements:
- Accounts: Checking, Savings, Other types
- Transfers: Source/Destination accounts, optional link to original transaction
- Transactions can now link to either a Card OR an Account
- Transfer categories excluded from spending reports via TransactionFilters

UI Pages:
- Add Accounts.cshtml - List all bank accounts with transaction counts
- Add EditAccount.cshtml - Create/edit bank accounts
- Add Accounts link to navigation
- Update all references from CardLast4 to Last4

Service Layer Updates:
- Update CardResolutionResult to use nullable CardId and renamed Last4
- Update TransactionKey record to include AccountId
- Update IsDuplicate check to include both CardId and AccountId
- Update all PaymentMethodLabel usage across pages

This architecture allows proper separation of credit cards from bank
accounts and enables tracking of transfers between accounts without
double-counting in spending reports.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 20:52:54 -04:00
AJ
ff14aed65f Add card management pages and enhance category mappings UI.
Features added:
- Cards page with list/create/edit/delete functionality
- EditCard page for modifying card details
- Enhanced CategoryMappings UI with inline add/edit/delete modals
- Category dropdown autocomplete in mapping forms
- Priority badges and visual indicators for high-priority mappings
- Click-to-edit functionality on patterns

Improvements:
- TransactionCategorizer: Add TARGET.COM to online shopping patterns
- TransactionCategorizer: Set Credit Card Payment to priority 200 to catch before Banking
- TransactionCategorizer: Add database migration comments
- Layout: Add Cards link to navigation
- Layout: Fix Bootstrap JS path
- ValidationScriptsPartial: Use Url.Content for script paths

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 16:49:18 -04:00