update
This commit is contained in:
@ -115,8 +115,10 @@ export class ZUGFeRDDecoder extends CIIBaseDecoder {
|
||||
objectActions: []
|
||||
};
|
||||
|
||||
// Validate mandatory EN16931 fields
|
||||
EN16931Validator.validateMandatoryFields(invoiceData);
|
||||
// Validate mandatory EN16931 fields unless validation is skipped
|
||||
if (!this.skipValidation) {
|
||||
EN16931Validator.validateMandatoryFields(invoiceData);
|
||||
}
|
||||
|
||||
return invoiceData;
|
||||
}
|
||||
|
@ -11,9 +11,10 @@ export class ZUGFeRDV1Decoder extends CIIBaseDecoder {
|
||||
/**
|
||||
* Constructor
|
||||
* @param xml XML string to decode
|
||||
* @param skipValidation Whether to skip EN16931 validation
|
||||
*/
|
||||
constructor(xml: string) {
|
||||
super(xml);
|
||||
constructor(xml: string, skipValidation: boolean = false) {
|
||||
super(xml, skipValidation);
|
||||
// Override namespaces for ZUGFeRD v1
|
||||
this.namespaces = {
|
||||
rsm: ZUGFERD_V1_NAMESPACES.RSM,
|
||||
|
Reference in New Issue
Block a user