Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualize XML into PDF throws error if XML contains multiple SpecifiedTradePaymentTerms blocks #557

Open
OnnoGabriel opened this issue Nov 14, 2024 · 0 comments

Comments

@OnnoGabriel
Copy link

OnnoGabriel commented Nov 14, 2024

Mustang 2.14.2 throws an error, if an XML with multiple SpecifiedTradePaymentTerms ("Teilzahlungen") is visualized as a PDF.

These are the SpecifiedTradePaymentTerms blocks in the factur-x.xml:

<ram:SpecifiedTradePaymentTerms>
    <ram:Description>1. Teilzahlung 228.00 EUR fällig am 28.11.2024</ram:Description>
    <ram:DueDateDateTime>
        <udt:DateTimeString format="102">20241128</udt:DateTimeString>
    </ram:DueDateDateTime>
    <ram:PartialPaymentAmount currencyID="EUR">228.00</ram:PartialPaymentAmount>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradePaymentTerms>
    <ram:Description>2. Teilzahlung 228.00 EUR fällig am 24.12.2024</ram:Description>
    <ram:DueDateDateTime>
        <udt:DateTimeString format="102">20241224</udt:DateTimeString>
    </ram:DueDateDateTime>
    <ram:PartialPaymentAmount currencyID="EUR">228.00</ram:PartialPaymentAmount>
</ram:SpecifiedTradePaymentTerms>

The whole XML is valid. But if I try to visualize the XML as a PDF with the --action pdf option, Mustang CLI throws an error:

In template uebersicht on line 13 column 35 
     invoked by xsl:call-template at #85
  In template rule with match="element(Q{urn:ce.eu:en16931:2017:xoev-de:kosit:standard:xrechnung-1}invoice)" on line 59 of 
     invoked by built-in template rule (text-only)
17:11:40.936 [main] ERROR o.m.ZUGFeRD.ZUGFeRDVisualizer - Failed to apply FOP
net.sf.saxon.trans.XPathException: Invalid date "2024-11-28;2024-12-24" (Day must be two digits). Found while atomizing the first argument of fn:normalize-space() in {$content} on line 128

However, the visualization as a HTML page with --action visualize runs well, it is just the PDF converter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant