3417ed6698
- expense_kind enum (utilities + maintenance/repair/cleaning/insurance/tax/rent/other) - property_expenses table with optional link to a property_accounts row (preserves history via ON DELETE SET NULL) - services/expenses.ts: CRUD + 12-month monthly series aggregation + year-to-date summary by kind - /properties/[id]/expenses tab: inline SVG line chart for electricity + water last 12 months (no chart library), summary card, add/edit/delete inline with account linking when kind matches
4 lines
179 B
SQL
4 lines
179 B
SQL
-- Updated_at trigger for property_expenses.
|
|
CREATE TRIGGER property_expenses_set_updated_at BEFORE UPDATE ON "property_expenses"
|
|
FOR EACH ROW EXECUTE FUNCTION set_updated_at();
|