Buildium bill imports left expense_account_id null on all bills because the
importer only read firstLine.GLAccountId, but the bill-line payload exposes the
GL id under GLAccount.Id (nested). chart_of_accounts.account_number already
stores the Buildium GL Id, so resolve the line's GL id from either shape before
mapping it. Re-syncing backfills existing bills via the update path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- buildium-sync now ensures every active association has an accounting company
after syncing associations. Once it exists, the existing DB triggers flow
units -> customers, owner ledger -> A/R + income, and bills -> A/P + expense
into Accounting automatically (closing the gap where Buildium synced only the
main dashboard, not Accounting).
- New buildium-opening-balances function: fetches an association's Buildium GL
trial balance as of a cutoff (default 2025-12-31, Accrual), maps GL accounts
to accounting accounts (flagging bank accounts), rolls prior-year P&L into
Retained Earnings, writes accounting.opening_balances, and posts the opening
GL entry. Idempotent; service-role gated.
Applied to 6 Buildium associations (opening balances + 2026 activity); all
balance. New columns/data applied to the project directly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace Lovable-bound email transport and auth webhook so the platform
sends all automated email through its own infrastructure.
- process-email-queue: drop sendLovableEmail/LOVABLE_API_KEY; send via the
Hostinger Email API (primary) with automatic SMTP fallback. Shared
transports added in _shared/hostinger-mail.ts and _shared/smtp-send.ts.
- auth-email-hook: verify Supabase's native Send Email hook signature
(Standard Webhooks via SEND_EMAIL_HOOK_SECRET) instead of Lovable's libs;
build the GoTrue verify URL; keep enqueue → process-email-queue.
- Recreate the 6 auth email templates under _shared/email-templates/ that
previously only existed in the deployed function.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Remove the Zoho Books integration (edge functions, sync libs, settings,
reports/overview, banking links, fees tab, import dialog); preserve fee
rules as a standalone FeesTab and the COA accounting_system classification.
- Financial Overview/Reports (staff + board) render the Accounting dashboard
and reports; board reports mirror the rich Accounting Reports.
- New Reserve Fund Schedule report + an is_reserve flag on accounts.
- Unify all report exports to a branded format (logo + centered header +
footer): shared ReportSheet (on-screen) and reportHeader (PDF). Budget vs
Actuals and Bank Reconciliation PDFs now match the reference layout.
- Render financial reports inline (no preview pop-up).
- Budget Management mirrors Accounting Budgeting (staff-accessible) with SPA
navigation; editable bills in the Accounting Bills page.
- Negative opening balances flow through to the GL and reports (allow negative
input; keep non-zero on save; signed CSV import).
- Upload a per-account trial balance via CSV on Opening Balances.
- Board members: read-only RLS access to their association's accounting ledger;
editable board-members panel on the association page; share vendor contacts
with the board (toggle + directory section).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>