@fin.cx/skr
Version:
SKR03 and SKR04 German accounting standards for double-entry bookkeeping
60 lines (59 loc) • 1.54 kB
TypeScript
import type { IAccountBalance } from './skr.types.js';
export interface IAccountBalanceExport extends IAccountBalance {
openingBalance?: number;
transactionCount?: number;
}
export interface IBalanceExportRow {
account_code: string;
account_name: string;
fiscal_year: number;
period?: string;
opening_balance: string;
closing_balance: string;
debit_sum: string;
credit_sum: string;
balance: string;
transaction_count: number;
}
export declare class BalancesExporter {
private exportPath;
private balances;
private fiscalYear;
constructor(exportPath: string, fiscalYear: number);
/**
* Adds a balance entry to the export
*/
addBalance(accountCode: string, accountName: string, balance: IAccountBalanceExport, period?: string): void;
/**
* Exports balances to CSV format
*/
exportToCSV(): Promise<void>;
/**
* Exports trial balance (Summen- und Saldenliste)
*/
exportTrialBalance(): Promise<void>;
/**
* Exports balances to JSON format
*/
exportToJSON(): Promise<void>;
/**
* Generates balance summary for specific account classes
*/
exportClassSummary(): Promise<void>;
/**
* Escapes CSV values
*/
private escapeCSV;
/**
* Formats number in German format (1.234,56)
*/
private formatGermanNumber;
/**
* Gets the number of balance entries
*/
getBalanceCount(): number;
/**
* Clears the balances list
*/
clear(): void;
}