Add jszip and financial export builder module

- Install jszip dependency (~100KB, pure JS)
- New src/lib/server/export/financial.ts builds a year-scoped ZIP
  with one CSV per logical table: company, projects, parties (incl
  archived), employees (incl terminated), budget_allocations, expenses,
  invoices + line items, salary_history (effective on/before year end),
  payslips + line items, packages (with carrier label and customs link),
  external_transactions (with provider label and matched expense),
  company_log
- All CSVs prefixed with UTF-8 BOM for Excel/Thai support
- Reference tables include soft-deleted rows so historical FKs resolve
- Routes and UI to follow in next commit

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-15 09:41:46 +07:00
parent 0bfbcef043
commit 843ed96aaa
3 changed files with 774 additions and 0 deletions
+1
View File
@@ -23,6 +23,7 @@
"chart.js": "^4.4.7",
"date-fns": "^4.1.0",
"drizzle-orm": "^0.38.4",
"jszip": "^3.10.1",
"papaparse": "^5.5.2",
"pdf-lib": "^1.17.1",
"pg": "^8.13.1",