<?xml version="1.0" encoding="UTF-8"?>
<ubl:Invoice xmlns:ubl="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:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <!--
      Dies ist eine Beispieldatei für das Ursprungsproblem (https://projekte.kosit.org/xrechnung/xrechnung-intern/-/issues/846)
      -->
    <cbc:CustomizationID
        xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
        >urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
    <cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
    <cbc:ID xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
        >0150085959</cbc:ID>
    <cbc:IssueDate xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
        >2020-09-10</cbc:IssueDate>
    <cbc:DueDate xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
        >2020-09-30</cbc:DueDate>
    <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
    <cbc:Note>Steuerkennzeichen X0</cbc:Note>
    <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
    <cbc:BuyerReference>Leitweg 4711</cbc:BuyerReference>
    <cac:AccountingSupplierParty>
        <cac:Party>
            <cbc:EndpointID schemeID="9930">DE199861724</cbc:EndpointID>
            <cac:PartyIdentification>
                <cbc:ID>DE199861724</cbc:ID>
            </cac:PartyIdentification>
            <cac:PartyName>
                <cbc:Name>DB Deutsche Bahn AG Absender</cbc:Name>
            </cac:PartyName>
            <cac:PostalAddress>
                <cbc:StreetName>Bahnhofstraße 45</cbc:StreetName>
                <cbc:CityName>Zughausen</cbc:CityName>
                <cbc:PostalZone>12345</cbc:PostalZone>
                <cac:Country>
                    <cbc:IdentificationCode>DE</cbc:IdentificationCode>
                </cac:Country>
            </cac:PostalAddress>
            <cac:PartyTaxScheme>
                <cac:TaxScheme>
                    <cbc:ID schemeID="UNCL5305">VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:PartyTaxScheme>
            <cac:PartyLegalEntity>
                <cbc:RegistrationName>DB Deutsche Bahn AG Absender</cbc:RegistrationName>
            </cac:PartyLegalEntity>
            <cac:Contact>
                <cbc:Name>Alfred E. Neumann</cbc:Name>
                <cbc:Telephone>+49 (69) 123-456</cbc:Telephone>
                <cbc:ElectronicMail>alfred.e.neumann@mad.de</cbc:ElectronicMail>
            </cac:Contact>
        </cac:Party>
    </cac:AccountingSupplierParty>
    <cac:AccountingCustomerParty>
        <cac:Party>
            <cbc:EndpointID schemeID="0204">Leitweg 4711</cbc:EndpointID>
            <cac:PartyName>
                <cbc:Name>DB Netz AG X-Rechnung</cbc:Name>
            </cac:PartyName>
            <cac:PostalAddress>
                <cbc:StreetName>Netzstraße 15</cbc:StreetName>
                <cbc:CityName>Haltemada</cbc:CityName>
                <cbc:PostalZone>12345</cbc:PostalZone>
                <cac:Country>
                    <cbc:IdentificationCode>DE</cbc:IdentificationCode>
                </cac:Country>
            </cac:PostalAddress>
            <cac:PartyTaxScheme>
                <cac:TaxScheme>
                    <cbc:ID schemeID="UNCL5305">VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:PartyTaxScheme>
            <cac:PartyLegalEntity>
                <cbc:RegistrationName>DB Netz AG X-Rechnung</cbc:RegistrationName>
            </cac:PartyLegalEntity>
            <cac:Contact>
                <cbc:Name>nicht vorhanden</cbc:Name>
                <cbc:Telephone>0</cbc:Telephone>
                <cbc:ElectronicMail>no_email</cbc:ElectronicMail>
            </cac:Contact>
        </cac:Party>
    </cac:AccountingCustomerParty>
    <?xmute mutator="identity" schematron-invalid="cenubl:BR-O-02 cenubl:BR-O-04" id="cen-inv-vat-code-invalid" description="BT-63/BG-11 not allowed with 'O' in BT-151 and BT-102"?>
    <?xmute mutator="remove" schematron-valid="cenubl:BR-O-02 cenubl:BR-O-04 xrubl:BR-DE-16" id="cen-inv-vat-code-valid" description="No BT-63/BG-11 with 'O' in BT-151 and BT-102"?>
    <!-- BG-11 -->
    <cac:TaxRepresentativeParty>
        <cac:PartyName>
            <cbc:Name>[Seller tax representative name]</cbc:Name>
        </cac:PartyName>
        <cac:PostalAddress>
            <cac:Country>
                <cbc:IdentificationCode>DE</cbc:IdentificationCode>
            </cac:Country>
        </cac:PostalAddress>
        <cac:PartyTaxScheme>
            <!-- BT-63 -->
            <cbc:CompanyID>DE124567</cbc:CompanyID>
            <cac:TaxScheme>
                <cbc:ID>VAT</cbc:ID>
            </cac:TaxScheme>
        </cac:PartyTaxScheme>
    </cac:TaxRepresentativeParty>
    <cac:PaymentMeans>
        <cbc:PaymentMeansCode>30</cbc:PaymentMeansCode>
        <cac:PayeeFinancialAccount>
            <cbc:ID>DE94820800000815609800</cbc:ID>
        </cac:PayeeFinancialAccount>
    </cac:PaymentMeans>
    <!-- BG-21 -->
    <cac:AllowanceCharge>
        <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
        <cbc:AllowanceChargeReason>reason</cbc:AllowanceChargeReason>
        <cbc:Amount currencyID="EUR">0.00</cbc:Amount>
        <cac:TaxCategory>
            <!-- BT-102 -->
            <cbc:ID>O</cbc:ID>
            <cac:TaxScheme>
                <cbc:ID>VAT</cbc:ID>
            </cac:TaxScheme>
        </cac:TaxCategory>
    </cac:AllowanceCharge>
    <cac:TaxTotal>
        <cbc:TaxAmount currencyID="EUR">0.00</cbc:TaxAmount>
        <cac:TaxSubtotal>
            <cbc:TaxableAmount currencyID="EUR">5000.00</cbc:TaxableAmount>
            <cbc:TaxAmount currencyID="EUR">0.00</cbc:TaxAmount>
            <cac:TaxCategory>
                <cbc:ID>O</cbc:ID>
                <cbc:Percent>0.00</cbc:Percent>
                <cbc:TaxExemptionReason>Nicht steuerbar</cbc:TaxExemptionReason>
                <cac:TaxScheme>
                    <cbc:ID schemeID="UNCL5305">VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:TaxCategory>
        </cac:TaxSubtotal>
    </cac:TaxTotal>
    <cac:LegalMonetaryTotal>
        <cbc:LineExtensionAmount currencyID="EUR">5000.00</cbc:LineExtensionAmount>
        <cbc:TaxExclusiveAmount currencyID="EUR">5000.00</cbc:TaxExclusiveAmount>
        <cbc:TaxInclusiveAmount currencyID="EUR">5000.00</cbc:TaxInclusiveAmount>
        <cbc:ChargeTotalAmount currencyID="EUR">0.00</cbc:ChargeTotalAmount>
        <cbc:PayableRoundingAmount currencyID="EUR">0.00</cbc:PayableRoundingAmount>
        <cbc:PayableAmount currencyID="EUR">5000.00</cbc:PayableAmount>
    </cac:LegalMonetaryTotal>
    <cac:InvoiceLine>
        <cbc:ID>000010</cbc:ID>
        <cbc:Note>Dummymaterial (Text ändern!!!)</cbc:Note>
        <cbc:InvoicedQuantity unitCode="C62">1.00</cbc:InvoicedQuantity>
        <cbc:LineExtensionAmount currencyID="EUR">5000.00</cbc:LineExtensionAmount>
        <cac:OrderLineReference>
            <cbc:LineID>undef</cbc:LineID>
        </cac:OrderLineReference>
        <cac:Item>
            <cbc:Description>Dummymaterial (Text ändern!!!)</cbc:Description>
            <cbc:Name>Dummymaterial (Text ändern!!!)</cbc:Name>
            <cac:SellersItemIdentification>
                <cbc:ID>L0014</cbc:ID>
            </cac:SellersItemIdentification>
            <cac:ClassifiedTaxCategory>
                <!-- BT-151 -->
                <cbc:ID>O</cbc:ID>
                <cac:TaxScheme>
                    <cbc:ID schemeID="UNCL5305">VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:ClassifiedTaxCategory>
        </cac:Item>
        <cac:Price>
            <cbc:PriceAmount currencyID="EUR">5000.00</cbc:PriceAmount>
            <cbc:BaseQuantity unitCode="C62">1.00</cbc:BaseQuantity>
        </cac:Price>
    </cac:InvoiceLine>
</ubl:Invoice>
