ValidateFin

CII CrossIndustryInvoice — BR-CO-13, the discount never reaches the tax basis

Uno sconto a livello documento che esiste solo a metà: la fattura concede 200,00 (BT-107), calcola l’IVA sulla base scontata (1.800,00 × 19 % = 342,00 — corretto), ma BT-109 (TaxBasisTotalAmount) dichiara ancora 2.000,00 senza sconto. BR-CO-13 impone BT-109 = BT-106 - BT-107 + BT-108: all’acquirente vengono così fatturati 200,00 che il venditore credeva di aver abbuonato.

CII D16B (CrossIndustryInvoice) — Non valido

Uno sconto a livello documento che esiste solo a metà: la fattura concede 200,00 (BT-107), calcola l’IVA sulla base scontata (1.800,00 × 19 % = 342,00 — corretto), ma BT-109 (TaxBasisTotalAmount) dichiara ancora 2.000,00 senza sconto. BR-CO-13 impone BT-109 = BT-106 - BT-107 + BT-108: all’acquirente vengono così fatturati 200,00 che il venditore credeva di aver abbuonato.

Fattura CII (sintassi XRechnung / Factur-X) CII D16B (CrossIndustryInvoice) EN 16931 / XRechnung 3.0Risultato atteso: Non valido — 2 errori

Cosa mostra questo file

Uno sconto a livello documento che esiste solo a metà: la fattura concede 200,00 (BT-107), calcola l’IVA sulla base scontata (1.800,00 × 19 % = 342,00 — corretto), ma BT-109 (TaxBasisTotalAmount) dichiara ancora 2.000,00 senza sconto. BR-CO-13 impone BT-109 = BT-106 - BT-107 + BT-108: all’acquirente vengono così fatturati 200,00 che il venditore credeva di aver abbuonato.

Transazioni2
Totale2342,00 €

I difetti che contiene

  • BR-CO-13BR-CO-13: TaxBasisTotalAmount (2000.00) must equal LineTotal - Allowances + Charges (1800.00).

Citato alla lettera dal validatore, non parafrasato.

Ultima verifica: Licenza: CC-BY-4.0

Tutte le parti, gli IBAN e gli importi qui sotto sono fittizi. Gli IBAN sono strutturalmente validi — superano il mod-97 — ma non corrispondono ad alcun conto reale.

Contenuto del file

<?xml version="1.0" encoding="UTF-8"?>
<!--
  ValidateFin sample file — CII (UN/CEFACT Cross Industry Invoice), XRechnung 3.0.
  DELIBERATELY BROKEN — BR-CO-13: the document level discount never reaches the tax basis.
  The invoice grants a 200.00 volume discount (BG-20, BT-107 = 200.00) and computes VAT on
  the discounted base (1 800.00 x 19 % = 342.00 — correct), but BT-109
  (TaxBasisTotalAmount) still declares the undiscounted 2 000.00. BR-CO-13 states that
  BT-109 = BT-106 - BT-107 + BT-108, so the invoice bills 200.00 it just gave away.
  Expected validation result: INVALID.

  All parties and account numbers are fictitious.
  Reference page: https://validatefin.com/en/resources/samples/cii-broken-tax-basis
  License: CC-BY-4.0
-->
<rsm:CrossIndustryInvoice
    xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
    xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
    xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
  <rsm:ExchangedDocumentContext>
    <ram:BusinessProcessSpecifiedDocumentContextParameter>
      <ram:ID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</ram:ID>
    </ram:BusinessProcessSpecifiedDocumentContextParameter>
    <ram:GuidelineSpecifiedDocumentContextParameter>
      <ram:ID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</ram:ID>
    </ram:GuidelineSpecifiedDocumentContextParameter>
  </rsm:ExchangedDocumentContext>

  <rsm:ExchangedDocument>
    <ram:ID>NWL-2026-0671</ram:ID>
    <ram:TypeCode>380</ram:TypeCode>
    <ram:IssueDateTime>
      <udt:DateTimeString format="102">20260327</udt:DateTimeString>
    </ram:IssueDateTime>
    <ram:IncludedNote>
      <ram:Content>Volume discount granted but not deducted from the taxable basis.</ram:Content>
    </ram:IncludedNote>
  </rsm:ExchangedDocument>

  <rsm:SupplyChainTradeTransaction>
    <ram:IncludedSupplyChainTradeLineItem>
      <ram:AssociatedDocumentLineDocument>
        <ram:LineID>1</ram:LineID>
      </ram:AssociatedDocumentLineDocument>
      <ram:SpecifiedTradeProduct>
        <ram:Name>Warehouse trolley</ram:Name>
        <ram:Description>Warehouse trolley, 300 kg capacity</ram:Description>
      </ram:SpecifiedTradeProduct>
      <ram:SpecifiedLineTradeAgreement>
        <ram:NetPriceProductTradePrice>
          <ram:ChargeAmount>150.00</ram:ChargeAmount>
        </ram:NetPriceProductTradePrice>
      </ram:SpecifiedLineTradeAgreement>
      <ram:SpecifiedLineTradeDelivery>
        <ram:BilledQuantity unitCode="C62">8</ram:BilledQuantity>
      </ram:SpecifiedLineTradeDelivery>
      <ram:SpecifiedLineTradeSettlement>
        <ram:ApplicableTradeTax>
          <ram:TypeCode>VAT</ram:TypeCode>
          <ram:CategoryCode>S</ram:CategoryCode>
          <ram:RateApplicablePercent>19</ram:RateApplicablePercent>
        </ram:ApplicableTradeTax>
        <ram:SpecifiedTradeSettlementLineMonetarySummation>
          <ram:LineTotalAmount>1200.00</ram:LineTotalAmount>
        </ram:SpecifiedTradeSettlementLineMonetarySummation>
      </ram:SpecifiedLineTradeSettlement>
    </ram:IncludedSupplyChainTradeLineItem>

    <ram:IncludedSupplyChainTradeLineItem>
      <ram:AssociatedDocumentLineDocument>
        <ram:LineID>2</ram:LineID>
      </ram:AssociatedDocumentLineDocument>
      <ram:SpecifiedTradeProduct>
        <ram:Name>Safety strap set</ram:Name>
        <ram:Description>Safety strap set for pallet loads</ram:Description>
      </ram:SpecifiedTradeProduct>
      <ram:SpecifiedLineTradeAgreement>
        <ram:NetPriceProductTradePrice>
          <ram:ChargeAmount>40.00</ram:ChargeAmount>
        </ram:NetPriceProductTradePrice>
      </ram:SpecifiedLineTradeAgreement>
      <ram:SpecifiedLineTradeDelivery>
        <ram:BilledQuantity unitCode="C62">20</ram:BilledQuantity>
      </ram:SpecifiedLineTradeDelivery>
      <ram:SpecifiedLineTradeSettlement>
        <ram:ApplicableTradeTax>
          <ram:TypeCode>VAT</ram:TypeCode>
          <ram:CategoryCode>S</ram:CategoryCode>
          <ram:RateApplicablePercent>19</ram:RateApplicablePercent>
        </ram:ApplicableTradeTax>
        <ram:SpecifiedTradeSettlementLineMonetarySummation>
          <ram:LineTotalAmount>800.00</ram:LineTotalAmount>
        </ram:SpecifiedTradeSettlementLineMonetarySummation>
      </ram:SpecifiedLineTradeSettlement>
    </ram:IncludedSupplyChainTradeLineItem>

    <ram:ApplicableHeaderTradeAgreement>
      <ram:BuyerReference>04011000-12345-34</ram:BuyerReference>
      <ram:SellerTradeParty>
        <ram:Name>Nordwind Logistik GmbH</ram:Name>
        <ram:DefinedTradeContact>
          <ram:PersonName>Rechnungsstelle</ram:PersonName>
          <ram:TelephoneUniversalCommunication>
            <ram:CompleteNumber>+49 40 555 0100</ram:CompleteNumber>
          </ram:TelephoneUniversalCommunication>
          <ram:EmailURIUniversalCommunication>
            <ram:URIID>[email protected]</ram:URIID>
          </ram:EmailURIUniversalCommunication>
        </ram:DefinedTradeContact>
        <ram:PostalTradeAddress>
          <ram:PostcodeCode>20457</ram:PostcodeCode>
          <ram:LineOne>Speicherstrasse 12</ram:LineOne>
          <ram:CityName>Hamburg</ram:CityName>
          <ram:CountryID>DE</ram:CountryID>
        </ram:PostalTradeAddress>
        <ram:URIUniversalCommunication>
          <ram:URIID schemeID="EM">[email protected]</ram:URIID>
        </ram:URIUniversalCommunication>
        <ram:SpecifiedTaxRegistration>
          <ram:ID schemeID="VA">DE123456789</ram:ID>
        </ram:SpecifiedTaxRegistration>
      </ram:SellerTradeParty>
      <ram:BuyerTradeParty>
        <ram:Name>Bundesamt fuer Logistik</ram:Name>
        <ram:PostalTradeAddress>
          <ram:PostcodeCode>10117</ram:PostcodeCode>
          <ram:LineOne>Wilhelmstrasse 40</ram:LineOne>
          <ram:CityName>Berlin</ram:CityName>
          <ram:CountryID>DE</ram:CountryID>
        </ram:PostalTradeAddress>
        <ram:URIUniversalCommunication>
          <ram:URIID schemeID="EM">[email protected]</ram:URIID>
        </ram:URIUniversalCommunication>
      </ram:BuyerTradeParty>
    </ram:ApplicableHeaderTradeAgreement>

    <ram:ApplicableHeaderTradeDelivery>
      <ram:ActualDeliverySupplyChainEvent>
        <ram:OccurrenceDateTime>
          <udt:DateTimeString format="102">20260325</udt:DateTimeString>
        </ram:OccurrenceDateTime>
      </ram:ActualDeliverySupplyChainEvent>
    </ram:ApplicableHeaderTradeDelivery>

    <ram:ApplicableHeaderTradeSettlement>
      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
      <ram:SpecifiedTradeSettlementPaymentMeans>
        <ram:TypeCode>58</ram:TypeCode>
        <ram:PayeePartyCreditorFinancialAccount>
          <ram:IBANID>DE02120300000000202051</ram:IBANID>
        </ram:PayeePartyCreditorFinancialAccount>
      </ram:SpecifiedTradeSettlementPaymentMeans>
      <ram:ApplicableTradeTax>
        <ram:CalculatedAmount>342.00</ram:CalculatedAmount>
        <ram:TypeCode>VAT</ram:TypeCode>
        <ram:BasisAmount>1800.00</ram:BasisAmount>
        <ram:CategoryCode>S</ram:CategoryCode>
        <ram:RateApplicablePercent>19</ram:RateApplicablePercent>
      </ram:ApplicableTradeTax>
      <ram:SpecifiedTradeAllowanceCharge>
        <ram:ChargeIndicator>

160 / 190 lines shown — the complete file is in the download above.

Come sappiamo che questi risultati reggono

Ogni file di questa libreria passa nel validatore del sito a ogni build. Il risultato atteso indicato sopra è verificato da un test automatico: se un file smettesse di corrispondere a quanto afferma questa pagina, la build fallirebbe. Due fixture ereditate sono state riparate così prima della pubblicazione: tre IBAN non superavano il mod-97 e diversi nomi usavano caratteri fuori dal set SEPA di base.

Fattura CII (sintassi XRechnung / Factur-X)