feat: accounting module — schema, migration, Zod schemas, AR balance service

Phase 1 foundation:
- Migration 0047: all accounting tables (invoice, payment_application,
  account_balance, account_code, journal_entry, billing_run), chart of
  accounts seed, nextBillingDate on enrollment, accounting module config
- Drizzle schema file with all table definitions and type exports
- Zod validation schemas (invoice, payment, billing, reports)
- AccountBalanceService: materialized AR balance per account

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
ryan
2026-04-06 12:00:34 +00:00
parent 5f4a12b9c4
commit b9798f2c8c
7 changed files with 548 additions and 0 deletions

View File

@@ -4,3 +4,4 @@ export * from './schema/accounts.js'
export * from './schema/inventory.js'
export * from './schema/pos.js'
export * from './schema/settings.js'
export * from './schema/accounting.js'