Pick the format by billing country, for example Peppol for Belgium and the Netherlands and XRechnung for Germany and Austria. Countries not listed use the store format. Credit notes always use the format of their invoice.
When a German buyer enters a Leitweg-ID as reference (the routing ID of German public bodies, for example 991-01234-56), the invoice is always XRechnung.
