# Samples for Statutory German Domestic B2B E-Invoices As german businesses have to be able to accept/read/understand domestic B2B e-invoices as of January 1st, 2025 ([the law](https://www.recht.bund.de/bgbl/1/2024/108/VO), in particular art. 23 on p. 23) and a bit of it's [background]( https://medium.com/@jochen.staerk/why-and-how-germany-bans-b2b-paper-invoices-a4c7977f314a)) and samples are nowhere in sight this is an attempt to demonstrate how temporary, makeshift, inofficial samples can be created based on a part of AWV's [ZUGFeRD Infopaket](https://www.ferd-net.de/ZUGFeRD-Download) using [Mustang](https://www.mustangproject.org/?mtm_campaign=b2bsamples) until someone feels responsible to release official samples. ## Background We need to parse invoices calculated according to the rules laid down in [EN16931-2](https://www.beuth.de/de/technische-regel/din-cen-ts-16931-2/274991011) using the [known codelists](https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/Registry+of+supporting+artefacts+to+implement+EN16931) as attributes. According to [EN16931-1](https://www.beuth.de/en/standard/din-en-16931-1/314992770), we have to support the XML syntaxes CII and UBL. Additionally, according to a [letter](https://www.dstv.de/wp-content/uploads/2023/10/BMF_2023-0922192-R.pdf) of the BMF, we have to assume that we also have to be able to parse CII embedded into PDF/A files, i.e. Factur-X~ZUGFeRD. I.e., we create three directories, FX for Factur-X, CII and UBL. ## 1. PDF Get the ZUGFeRD 2.2 samples by downloading the [Infopaket](https://www.ferd-net.de/standards/zugferd-2.2/index.html?changelang=4) We put the samples (Factur-X=PDF files) from the EN16931 and XRechnung reference profile (they are EN16931 as well) in the FX folder. ## 2. CII Get [Mustang](https://www.mustangproject.org/commandline/?mtm_campaign=b2bsamples) We can either use Mustang `--action extract` or we open the files in a PDF reader and save their embedded factur-x.xml's (or, in case of the xrechnung reference profile, the xrechnung.xml) as .cii.xml. ## 3. UBL We switch to the UBL directory and use `--action ubl` to convert all CII files to UBL. (Mustang uses Philip Helger's great open source [CII2UBL](https://github.com/phax/en16931-cii2ubl) for that purpose there). Please note that `--action validate` will work on FX and CII but not yet on UBL files ([issue](https://github.com/ZUGFeRD/mustangproject/issues/337)), the offline viewer [Quba](https://quba-viewer.org/?mtm_campaign=b2bsamples) should still be capable to render all three formats. ## EeISI_300_CENfullmodel The file not_validating_full_invoice_based_onTest_EeISI_300_CENfullmodel is taken from the Eigor-Part of https://github.com/AgID/EeISI-mapper/ and converted to CII and UBL. This was the original source, from which you can see that "def" is e.g. BT-14: ``` Test_EeISI_100 2018-11-12 380 EUR NOK 35 2018-11-30 123 456 789 abc def ghi lmn opq rst uvz total amount #AAA# invoice note text #AAA# invoice note text 2 BT-23 Business Process Type urn:cen.eu:en16931:2017 abc123 2018-10-04 abc456 2018-10-01 Seller name Seller trading name Seller identifier 1 Seller identifier 2 Seller legal identifier DE12345677 DE49294093 Seller additional legal information Seller electronic address Seller address line 1 Seller address line 2 Seller address line 3 Seller city 12345 Seller country subdivision DE Seller contact point +41 345 654455 seller@contact.de Buyer name Buyer trading name Buyer identifier Buyer legal registration identifier IE394838894 Buyer electronic address Buyer address line 1 Buyer address line 2 Buyer address line 3 Buyer city 34562 Buyer country subdivision IE Buyer contact point +353 2948584 buyer@contact.ie Payee name Payee identifier Payee legal registration identifier Tax representative name DE3949053 Tax representative address line 1 Tax representative address line 2 Tax representative address line 3 Tax representative city 23455 Tax representative country subdivision DE Deliver to party name deliver location identifier 2018-12-04 2018-11-12 2018-11-30 Deliver to address line 1 Deliver to address line 2 Deliver to address line 3 Deliver to city 98765 Deliver to country subdivision IE 4 SEPA Remittance information IT1212341234123412 Payment account name BSCTCH22 IT1212341234123413 Payment account name 2 BSCTCH22 1234 Payment card holder name Mandate reference identifier Bank assigned creditor identifier Debited account identifier 10.00 1000.00 1.00 S 5.00 Doc allowance reason text 55 10.00 1000.00 1.00 S 5.00 Doc charge reason text AAA 2000.00 10.00 10.00 2000.00 50 46 2050 0 0 2050 1000 50 S 5.00 1000 0 E 0 Exemtion reason text Exemption reason code Supporting document ref Supporting document descr External document location ZGVmYXVsdA== 1a Invoice line note Line object identifier 10 EA 1000 12345 6789 2018-11-12 2018-11-30 10 1000 1 Invoice line allowance reason 55 10 1000 1 Invoice line charge reason AAA 10 1 11 1 EA S 5 Item name Item description Item seller's identifier Item buyer's identifier Item standar identifier Item classification identifier0 IT Color Red Size L 1b 10 EA 1000 10 E 0 Item name 2 ``` ## 4. Do something with it And don't forget to have fun. Kind regards,\ Your Mustang Team\ Jochen Stärk\ Chief [Mustangproject.org](https://mustangproject.org/?mtm_campaign=b2bsamples) ZUGFeRD Amatuer\ jstaerk[at]usegroup.de