@fin.cx/einvoice
Version:
A TypeScript module for creating, manipulating, and embedding XML data within PDF files specifically tailored for electronic invoice (einvoice) packages.
35 lines (34 loc) • 1.06 kB
TypeScript
import { UBLBaseDecoder } from '../ubl.decoder.js';
import type { TCreditNote, TDebitNote } from '../../../interfaces/common.js';
/**
* Decoder for XRechnung (UBL) format
* Implements decoding of XRechnung invoices to TInvoice
*/
export declare class XRechnungDecoder extends UBLBaseDecoder {
/**
* Decodes a UBL credit note
* @returns Promise resolving to a TCreditNote object
*/
protected decodeCreditNote(): Promise<TCreditNote>;
/**
* Decodes a UBL debit note (invoice)
* @returns Promise resolving to a TDebitNote object
*/
protected decodeDebitNote(): Promise<TDebitNote>;
/**
* Extracts common invoice data from XRechnung XML
* @returns Common invoice data
*/
private extractCommonData;
/**
* Extracts party information from XML
* @param partyPath XPath to the party element
* @returns TContact object
*/
private extractParty;
/**
* Creates an empty TContact object
* @returns Empty TContact object
*/
private createEmptyContact;
}