feat(transactions): manual transaction support and multi-owner query infrastructure
- Add POST /api/transactions to create manual transactions (statement_id=NULL, owner_id set directly) - Queries switch from JOIN to LEFT JOIN statements so manual transactions are visible - COALESCE(t.owner_id, s.owner_id) throughout for owner resolution - Add "Manual" bank filter option in getTransactions - Search extended to include merchant_normalized override - Split data fetched via lateral subquery on every transaction row - getParticipantBalances rewritten as UNION for bidirectional net balances (credits/refunds negate, split from either side of the relationship) - getSharedTransactions: remove my_share_percent from SELECT (fixes GROUP BY error), WHERE rewritten as two distinct cases (owner with others split vs participant on others' txn) - getTransactions: OR EXISTS condition so split participants see shared transactions - add-transaction-modal component for creating manual transactions with splits - 0008_my_share_percent migration adds my_share_percent to transaction_overrides
This commit is contained in:
@@ -0,0 +1 @@
|
||||
ALTER TABLE "transaction_overrides" ADD COLUMN "my_share_percent" DECIMAL(5,2);
|
||||
@@ -13,6 +13,7 @@ model transaction_overrides {
|
||||
merchant_normalized String?
|
||||
category_override String?
|
||||
notes String?
|
||||
my_share_percent Decimal? @db.Decimal(5, 2)
|
||||
updated_at DateTime @default(now()) @updatedAt
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user