This commit includes all previously untracked backend files: Domain: - Accounts, Attachments, BankConnections, Customers - FiscalYears, Invoices, JournalEntryDrafts - Orders, Products, UserAccess Commands & Handlers: - Full CQRS command structure for all domains Repositories: - PostgreSQL repositories for all read models - Bank transaction and ledger repositories GraphQL: - Input types, scalars, and types for all entities - Mutations and queries Infrastructure: - Banking integration (Enable Banking client) - File storage, Invoicing, Reporting, SAF-T export - Database migrations (003-029) Tests: - Integration tests for GraphQL endpoints - Domain tests - Invoicing and reporting tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
17 lines
797 B
SQL
17 lines
797 B
SQL
-- 015_AddStandardAccountNumber.sql
|
|
-- Adds Erhvervsstyrelsens standardkontonummer field for SAF-T 2.0 compliance
|
|
-- Required by January 2027 per Danish bookkeeping law (bogføringsloven)
|
|
|
|
-- Add the standard_account_number column
|
|
ALTER TABLE account_read_models
|
|
ADD COLUMN IF NOT EXISTS standard_account_number VARCHAR(10);
|
|
|
|
-- Create index for efficient lookups by standard account number
|
|
-- Useful for SAF-T export and reporting
|
|
CREATE INDEX IF NOT EXISTS idx_account_standard_number
|
|
ON account_read_models(company_id, standard_account_number)
|
|
WHERE standard_account_number IS NOT NULL;
|
|
|
|
-- Add comment for documentation
|
|
COMMENT ON COLUMN account_read_models.standard_account_number IS
|
|
'Erhvervsstyrelsens standardkontonummer for SAF-T rapportering. Mapping til officiel dansk kontoplan.';
|