konik-io / konik

A library to create, read and validate ZUGFeRD compliant invoices. Available for Java and .NET
https://konik.io
Other
48 stars 19 forks source link

HeaderExchangedDocument - IssueDateTime - is missing #67

Closed mahop-net closed 5 years ago

mahop-net commented 5 years ago

Hello,

I have the ZUGFeRD XML below and want to read the IssueDateTime with the following code but it returns null on .getIssued(). The XML was created with konik - according to my customer.

Do I do something wrong or is this a bug?

Code:

            var handler = new PdfHandler();
            using (InputStream inputZugferdPdfStream = new FileInputStream(pdfFileName)) {
                var invoice = handler.extractInvoice(inputZugferdPdfStream);
                var header = invoice.getHeader();
                if (!string.IsNullOrWhiteSpace(header?.getIssued()?.toString())) {
                    var rechnungsDatum = DateTime.Parse(header?.getIssued()?.toString());
                }

XML:

    <rsm:HeaderExchangedDocument>
        <ram:ID>7063111335</ram:ID>
        <ram:Name>Sammelrechnung</ram:Name>
        <ram:TypeCode>380</ram:TypeCode>
        <ram:IssueDateTime>
            <udt:DateTimeString format="102">20190122</udt:DateTimeString>
        </ram:IssueDateTime>
Vad1mo commented 5 years ago

can you paste the xml? you can also send the file to <hello(at)konik.io>

mahop-net commented 5 years ago

The mail to <hello(at)konik.io> with the xml attached was rejected by google mail. The XML contains confidential content so I don't want to post it here. I try to zip it first and resend it...

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.