stephanstapel / ZUGFeRD-csharp

C# assembly for creating and reading ZUGFeRD invoices
Apache License 2.0
214 stars 114 forks source link

Add full Adress To BuyerTradeParty in XRechnung Profile #374

Closed Nichsen closed 1 month ago

Nichsen commented 1 month ago

ZUGFeRDVersion : Version23 Profile: XRechnung

Kosit Validator (XRechnung 3.0.1) complains about missing buyer address (city, postcode...). I think the problem is that it is only provided if it is a "BuyerTaxRepresentativeTradeParty" or the profil is "Extended".

stephanstapel commented 1 month ago

Hi @Nichsen , can you share the code, the file and tell if you are using the nuget version or the current github code?

Nichsen commented 1 month ago

Hi @stephanstapel im using the github master version.

image

While debuging i added additional XRechnung Profile: InvocieDescriptor23CIIWriter.cs Line 1372: if ((this.Descriptor.Profile == Profile.Extended)|| (this.Descriptor.Profile == Profile.XRechnung) || partyType.In(PartyTypes.SellerTradeParty, PartyTypes.BuyerTaxRepresentativeTradeParty, PartyTypes.ShipToTradeParty, PartyTypes.ShipToTradeParty, PartyTypes.UltimateShipToTradeParty, PartyTypes.SalesAgentTradeParty))

With this implementaion the error in the validator is gone:

stephanstapel commented 1 month ago

are you talking about BuyerTaxRepresentativeTradeParty or BuyerTradeParty?

Nichsen commented 1 month ago

My "Buyer" is a "BuyerTradeParty". But for "BuyerTradeParty" the adress will not be written in the XML