UNPKG

@fin.cx/skr

Version:

SKR03 and SKR04 German accounting standards for double-entry bookkeeping

83 lines (82 loc) 2.32 kB
import type { ITrialBalanceReport, IIncomeStatement, IBalanceSheet } from './skr.types.js'; export interface IPdfReportOptions { companyName: string; companyAddress?: string; taxId?: string; registrationNumber?: string; fiscalYear: number; dateFrom: Date; dateTo: Date; preparedBy?: string; preparedDate?: Date; } export declare class PdfReportGenerator { private exportPath; private options; private pdfInstance; constructor(exportPath: string, options: IPdfReportOptions); /** * Initializes the PDF generator */ initialize(): Promise<void>; /** * Generates the trial balance PDF report */ generateTrialBalancePdf(report: ITrialBalanceReport): Promise<Buffer>; /** * Generates the income statement PDF report */ generateIncomeStatementPdf(report: IIncomeStatement): Promise<Buffer>; /** * Generates the balance sheet PDF report */ generateBalanceSheetPdf(report: IBalanceSheet): Promise<Buffer>; /** * Generates the comprehensive Jahresabschluss PDF */ generateJahresabschlussPdf(trialBalance: ITrialBalanceReport, incomeStatement: IIncomeStatement, balanceSheet: IBalanceSheet): Promise<Buffer>; /** * Generates HTML for trial balance report */ private generateTrialBalanceHtml; /** * Generates HTML for income statement report */ private generateIncomeStatementHtml; /** * Generates HTML for balance sheet report */ private generateBalanceSheetHtml; /** * Generates comprehensive Jahresabschluss HTML */ private generateJahresabschlussHtml; /** * Generates the report header */ private generateHeader; /** * Generates the report footer */ private generateFooter; /** * Gets the base CSS styles for all reports */ private getBaseStyles; /** * Formats number in German format (1.234,56) */ private formatGermanNumber; /** * Formats date in German format (DD.MM.YYYY) */ private formatGermanDate; /** * Saves a PDF report to the export directory */ savePdfReport(filename: string, pdfBuffer: Buffer): Promise<string>; /** * Closes the PDF generator */ close(): Promise<void>; }