UNPKG

@e-invoice-eu/core

Version:

Generate e-invoices (E-Rechnung in German) conforming to EN16931 (Factur-X/ZUGFeRD, UBL, CII, XRechnung aka X-Rechnung) from LibreOffice Calc/Excel data or JSON.

30 lines (29 loc) 896 B
import { ExpandObject } from 'xmlbuilder2/lib/interfaces'; import { Logger } from '../logger.interface'; import { Invoice } from './invoice.interface'; export type FileInfo = { buffer: Uint8Array; filename: string; mimetype: string; id?: string; description?: string; }; export type InvoiceServiceOptions = { format: string; spreadsheet?: FileInfo; pdf?: FileInfo; lang: string; attachments?: FileInfo[]; embedPDF?: boolean; libreOfficePath?: string; noWarnings?: boolean; postProcessor?: (data: ExpandObject) => Promise<void>; }; export declare class InvoiceService { private readonly logger; private readonly formatFactoryService; private readonly validationService; constructor(logger: Logger); generate(input: Invoice, options: InvoiceServiceOptions): Promise<string | Uint8Array>; private deprecationWarning; }