This commit is contained in:
2025-04-03 13:26:27 +00:00
parent 05a2edc70c
commit 3e8b5c2869
13 changed files with 704 additions and 131 deletions

View File

@ -1,6 +1,6 @@
import { BaseDecoder } from './base.decoder.js';
import { FacturXDecoder } from './facturx.decoder.js';
import { XInvoiceDecoder } from './xinvoice.decoder.js';
import { XInvoiceDecoder } from './xrechnung.decoder.js';
/**
* Factory class for creating the appropriate decoder based on XML format.

View File

@ -7,7 +7,7 @@ import { BaseDecoder } from './base.decoder.js';
* XRechnung is the German implementation of the European standard EN16931
* for electronic invoices to the German public sector.
*/
export class XInvoiceDecoder extends BaseDecoder {
export class XRechnungDecoder extends BaseDecoder {
private xmlDoc: Document | null = null;
private namespaces: { [key: string]: string } = {
cbc: 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2',

View File

@ -2,19 +2,19 @@ import * as plugins from '../plugins.js';
/**
* A class to convert a given ILetter with invoice data
* into an XInvoice/XRechnung compliant XML (based on UBL).
* into an XRechnung compliant XML (based on UBL).
*
* XRechnung is the German implementation of the European standard EN16931
* for electronic invoices to the German public sector.
*/
export class XInvoiceEncoder {
export class XRechnungEncoder {
constructor() {}
/**
* Creates an XInvoice compliant XML based on the provided letter data.
* Creates an XRechnung compliant XML based on the provided letter data.
*/
public createXInvoiceXml(letterArg: plugins.tsclass.business.ILetter): string {
public createXRechnungXml(letterArg: plugins.tsclass.business.ILetter): string {
// Use SmartXml for XML creation
const smartxmlInstance = new plugins.smartxml.SmartXml();