Only a single InvoiceDocumentReference in xml file #507
Replies: 3 comments
-
Hi @digikungfu , UBL supports only one such reference: |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply, I was wondering, because we try some commercial tools witch starts with <ns0:Invoice xmlns:ns0="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" that contains multiple InvoiceDocumentReferences. If I switch the save parameter from ZUGFeRDFormats.UBL to ZUGFeRDFormats.CII I got a System.NullReferenceException. I guess there is some mandantory field I missed |
Beta Was this translation helpful? Give feedback.
-
I was able to solve the System.NullReferenceExeption error from my last post. I had included the ZUGFeRD component via nuget as a reference in my project. For further debugging, the idea was to delete the reference and instead include the complete source code, i.e. all cs files in the project. That was the solution. I can now use the parameter ZUGFeRDFormats.CII in the Save method without the System.NullReferenceExeption error. Why this didn't work with nuget and referencing is unclear to me. Now I can also see all InvoiceDocumentReferences. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
if a add multiple InvoiceDocumentReference s with desc.AddInvoiceReferencedDocument() I can only see the first one in the generated xml document. My profile is
desc.Save(
stream: stream,
version: ZUGFeRDVersion.Version23,
profile: Profile.XRechnung,
format: ZUGFeRDFormats.UBL
);
Here are the first lines of the Result:
<ubl:Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
cbc:CustomizationIDurn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
cbc:ProfileIDurn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
cbc:IDA K24/552</cbc:ID>
cbc:IssueDate2024-08-30</cbc:IssueDate>
cbc:DueDate2024-09-17</cbc:DueDate>
cbc:InvoiceTypeCode380</cbc:InvoiceTypeCode>
cbc:NoteRechnung zu unserem Projekt: </cbc:Note>
cbc:DocumentCurrencyCodeEUR</cbc:DocumentCurrencyCode>
cac:BillingReference
cac:InvoiceDocumentReference
cbc:IDA K21/119</cbc:ID>
cbc:IssueDate2023-12-31</cbc:IssueDate>
</cac:InvoiceDocumentReference>
</cac:BillingReference>
cac:AccountingSupplierParty
Anny hints?
regards
Andy
Beta Was this translation helpful? Give feedback.
All reactions