Direct Buildium A/P import: bills, payments, one-off checks via GL Account Map

- public.bills.line_items + line-aware accounting mirror (one bill_item per
  Buildium line with its mapped platform account)
- buildium-sync bills: strict per-line resolution through
  buildium_gl_account_links (unmapped -> bill held + flagged); pulls
  /bills/{id}/payments (check#, bank, date) and /bankaccounts/{id}/checks
  (one-off checks become paid bill+payment pairs)
- import-mode companies get direct JEs (buildium_bill Dr expense/Cr AP,
  buildium_billpay Dr AP/Cr mapped bank) + cleared register rows; sets
  buildium_gl.exclude_ap so the nightly GL pull skips Bill/Bill Payment/Check
- buildium-gl-sync: exclude_ap transaction-type filter; preserve buildium_gl
  config keys when advancing the watermark
- Settings: Pull Bills & Expenses card with held/unmapped reporting

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 18:43:58 -04:00
parent 4e77098f88
commit 25064d8418
4 changed files with 376 additions and 30 deletions
+3
View File
@@ -2058,6 +2058,7 @@ export type Database = {
expense_account_id: string | null
id: string
invoice_number: string | null
line_items: Json | null
notes: string | null
paid_date: string | null
payment_method: string | null
@@ -2085,6 +2086,7 @@ export type Database = {
expense_account_id?: string | null
id?: string
invoice_number?: string | null
line_items?: Json | null
notes?: string | null
paid_date?: string | null
payment_method?: string | null
@@ -2112,6 +2114,7 @@ export type Database = {
expense_account_id?: string | null
id?: string
invoice_number?: string | null
line_items?: Json | null
notes?: string | null
paid_date?: string | null
payment_method?: string | null