fix(transactions): editable transaction type, fee/interest counted as spend, fees category
- TypeBadge is now clickable — opens inline select to change debit/credit/fee/interest/etc. - PATCH /api/transactions/[id] now accepts transaction_type, updates transactions table directly - Analytics monthly query includes fee and interest types as spend (not just debit) - fee and interest amounts show red in transaction list (same as debit) - Add fees category to taxonomy
This commit is contained in:
@@ -38,7 +38,7 @@ export async function GET(req: NextRequest) {
|
||||
LEFT JOIN transaction_splits ts ON ts.transaction_id = t.id AND ts.participant_id = $1
|
||||
JOIN statements s ON s.id = t.statement_id
|
||||
WHERE s.owner_id = $1
|
||||
AND t.transaction_type = 'debit'
|
||||
AND t.transaction_type IN ('debit', 'fee', 'interest')
|
||||
AND COALESCE(o.category_override, t.category) NOT IN ('transfers', 'investment')
|
||||
AND t.transaction_date >= $2
|
||||
AND t.transaction_date < $3
|
||||
|
||||
Reference in New Issue
Block a user