working
This commit is contained in:
@ -3,7 +3,7 @@ import { InvoiceFormat } from '../../interfaces/common.js';
|
||||
import { FormatDetector } from '../utils/format.detector.js';
|
||||
|
||||
// Import specific decoders
|
||||
// import { XRechnungDecoder } from '../ubl/xrechnung/xrechnung.decoder.js';
|
||||
import { XRechnungDecoder } from '../ubl/xrechnung/xrechnung.decoder.js';
|
||||
import { FacturXDecoder } from '../cii/facturx/facturx.decoder.js';
|
||||
// import { ZUGFeRDDecoder } from '../cii/zugferd/zugferd.decoder.js';
|
||||
|
||||
@ -21,12 +21,8 @@ export class DecoderFactory {
|
||||
|
||||
switch (format) {
|
||||
case InvoiceFormat.UBL:
|
||||
// return new UBLDecoder(xml);
|
||||
throw new Error('UBL decoder not yet implemented');
|
||||
|
||||
case InvoiceFormat.XRECHNUNG:
|
||||
// return new XRechnungDecoder(xml);
|
||||
throw new Error('XRechnung decoder not yet implemented');
|
||||
return new XRechnungDecoder(xml);
|
||||
|
||||
case InvoiceFormat.CII:
|
||||
// For now, use Factur-X decoder for generic CII
|
||||
|
@ -3,7 +3,7 @@ import { InvoiceFormat } from '../../interfaces/common.js';
|
||||
import type { ExportFormat } from '../../interfaces/common.js';
|
||||
|
||||
// Import specific encoders
|
||||
// import { XRechnungEncoder } from '../ubl/xrechnung/xrechnung.encoder.js';
|
||||
import { XRechnungEncoder } from '../ubl/xrechnung/xrechnung.encoder.js';
|
||||
import { FacturXEncoder } from '../cii/facturx/facturx.encoder.js';
|
||||
// import { ZUGFeRDEncoder } from '../cii/zugferd/zugferd.encoder.js';
|
||||
|
||||
@ -25,8 +25,7 @@ export class EncoderFactory {
|
||||
|
||||
case InvoiceFormat.XRECHNUNG:
|
||||
case 'xrechnung':
|
||||
// return new XRechnungEncoder();
|
||||
throw new Error('XRechnung encoder not yet implemented');
|
||||
return new XRechnungEncoder();
|
||||
|
||||
case InvoiceFormat.CII:
|
||||
// For now, use Factur-X encoder for generic CII
|
||||
|
Reference in New Issue
Block a user