stephanstapel / ZUGFeRD-csharp

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

UBL-Writer - TaxRegistrationSchemeID VAT not correct #358

Closed quotschmacher closed 1 month ago

quotschmacher commented 1 month ago

I did not find the exact table of codes, but all examples used "VAT" instead of "VA".

One example:

https://www.deutschebahn.com/resource/blob/7583740/889ac6336d6e77bc2068b9ae36916752/Musterrechnung-UBL--data.pdf image

https://github.com/stephanstapel/ZUGFeRD-csharp/blob/df32503306a6a19aaa4ba4ac7fd175b425e91ee9/ZUGFeRD/TaxRegistrationSchemeID.cs#L49

stephanstapel commented 1 month ago

You might be right: https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-creditnote/cac-AccountingSupplierParty/cac-Party/cac-PartyTaxScheme/cac-TaxScheme/

UNTDID 1153 however is pretty clear and states 'VA'.

grafik

Could you seek the definition of this field on the internet to find out the list of allowed values?

quotschmacher commented 1 month ago

What I could not found is any document telling me, what code table to use here...

https://www.erechnung.gv.at/erb/info_channel_explanation?ubl says image

https://portal3.gefeg.com/projectdata/invoice/deliverables/installed/publishingproject/xrechnung%202.1.1%20-%20(ab%2001.02.2022)/xrechnung_ubl_invoice_v2.1.1_01.02.2022.scm/html/de/021.htm?https://portal3.gefeg.com/projectdata/invoice/deliverables/installed/publishingproject/xrechnung%202.1.1%20-%20(ab%2001.02.2022)/xrechnung_ubl_invoice_v2.1.1_01.02.2022.scm/html/de/0285.htm says image

interesting: https://projekte.kosit.org/xrechnung/xrechnung-schematron/-/blob/ff1d4f2208329b574f9ba320dce6f3fb9afca6c1/test/instances/ubl-inv/ubl-inv-br-de-16-negative-test-bt-102.xml uses "FC" if used as BT-32 and "VAT" if used as BT-31. "FC" is on the list where your "VA"-screenshot is from. So I would guess it depends on how you use this field.

stephanstapel commented 1 month ago

What I could not found is any document telling me, what code table to use here...

Thanks for sharing your investigation!

https://www.erechnung.gv.at/erb/info_channel_explanation?ubl says image

interesting, since 5133 says 'VA'. Oh my. Guess we need a mapping layer...

stephanstapel commented 1 month ago

@quotschmacher : can you please test the current version? Test case looks good: https://github.com/stephanstapel/ZUGFeRD-csharp/blob/2382f55a2caeec2078868290b21a61eb851d2f15/ZUGFeRD-Test/XRechnungUBLTests.cs#L188

stephanstapel commented 1 month ago

@quotschmacher : could you verify that this is fixed so we can close this issue?

quotschmacher commented 1 month ago

sorry - missed that one