UNPKG

@fin.cx/skr

Version:

SKR03 and SKR04 German accounting standards for double-entry bookkeeping

54 lines (53 loc) 1.25 kB
import type { IAccountData, TSKRType } from './skr.types.js'; export interface IAccountDataExport extends IAccountData { parentAccount?: string; defaultTaxCode?: string; activeFrom?: Date | string; activeTo?: Date | string; } export interface IAccountExportRow { account_code: string; name: string; type: string; class: number; parent?: string; skr_set: TSKRType; tax_code_default?: string; active_from?: string; active_to?: string; description?: string; is_active: boolean; } export declare class AccountsExporter { private exportPath; private accounts; constructor(exportPath: string); /** * Adds an account to the export */ addAccount(account: IAccountDataExport): void; /** * Exports accounts to CSV format */ exportToCSV(): Promise<void>; /** * Exports accounts to JSON format (alternative) */ exportToJSON(): Promise<void>; /** * Escapes CSV values */ private escapeCSV; /** * Formats a date to ISO date string */ private formatDate; /** * Gets the number of accounts */ getAccountCount(): number; /** * Clears the accounts list */ clear(): void; }