fix(zugferd): Refactor Zugferd decoders to properly extract house numbers from street names and remove unused imports; update readme hints with additional TInvoice reference and refresh PDF metadata timestamps.
This commit is contained in:
@ -1,11 +1,24 @@
|
||||
import { CIIBaseValidator } from '../cii.validator.js';
|
||||
import { ValidationLevel } from '../../../interfaces/common.js';
|
||||
import type { ValidationResult } from '../../../interfaces/common.js';
|
||||
|
||||
/**
|
||||
* Validator for ZUGFeRD invoice format
|
||||
*/
|
||||
export class ZUGFeRDValidator extends CIIBaseValidator {
|
||||
/**
|
||||
* Validates ZUGFeRD XML structure
|
||||
* @returns True if structure validation passed
|
||||
*/
|
||||
protected validateStructure(): boolean {
|
||||
// Check for required elements in ZUGFeRD structure
|
||||
const invoiceId = this.getText('//rsm:ExchangedDocument/ram:ID');
|
||||
if (!invoiceId) {
|
||||
this.addError('ZUGFERD-STRUCT-1', 'Invoice ID is required', '//rsm:ExchangedDocument/ram:ID');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates ZUGFeRD XML against business rules
|
||||
* @returns True if business validation passed
|
||||
|
Reference in New Issue
Block a user