Finvoice specialities

Validation

Finvoice 1.3, 2.0, 2.01 and non-EN16931 version of Finvoice 3.0 have only XSD validation.
XSD validation verifies the structure of the document, and performs simple data type verifications for the given values, but does not recognize any calculation or logic errors.

Discounts and charges in the invoice row

Background

Implementation guideline does not explicitly define calculation logic for RowVatExcludedAmount element, but is indirectly referred in Finvoice XLS data list files.

In all Finvoice versions the logic is following:

Amount multiplied from quantity, unitprice (Row Discount deducted)

Though the documentation is not up to date it is supposed to also include sum of row charges (RowChargeDetails).

Taking this into account, the calculation logic is as follows:

RowVatExcludedAmount = (InvoicedQuantity * UnitPriceNetAmount) - (RowDiscountAmount or sum of each RowProgressiveDiscountDetails/RowDiscountAmount) + (sum of each RowChargeDetails/Amount)

Unit price and quantity

The unit price net amount (UnitPriceNetAmount) of the invoice line is always expected to be positive regardless of the type of document (invoice or credit note) and the unit quantity (InvoicedQuantity) can be either positive or negative. The standard EN16931 follows the same rule.

Unit price net amount is expected to include unit price discount:

UnitPriceNetAmount = UnitPriceAmount - UnitPriceDiscountAmount

Creating a proper credit note

Background

Finvoice implementation guide does not clearly describe how to generate credit notes with row discounts and charges. Point of this guide is to provide understandable guidelines how to create a one.

Example

Example has unit price discount, row discount and row charge:

Let’s say that we have following original invoice line:

<InvoiceRow>
  <ArticleName>Article</ArticleName>
  <InvoicedQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="C62">1,00</InvoicedQuantity>
  <UnitPriceAmount AmountCurrencyIdentifier="EUR" 
                   UnitPriceUnitCode="kpl" 
                   QuantityUnitCodeUN="C62">110,00</UnitPriceAmount>
  <UnitPriceDiscountAmount AmountCurrencyIdentifier="EUR">10,00</UnitPriceDiscountAmount>
  <UnitPriceNetAmount AmountCurrencyIdentifier="EUR">100,00</UnitPriceNetAmount>
  <!-- Row discount, if there would be need for multiple use RowProgressiveDiscountDetails (2..n) -->
  <RowDiscountPercent>55,0</RowDiscountPercent> 
  <RowDiscountAmount AmountCurrencyIdentifier="EUR">55,00</RowDiscountAmount>
  <RowDiscountBaseAmount AmountCurrencyIdentifier="EUR">100,00</RowDiscountBaseAmount>
  <RowDiscountTypeText>Discount #1</RowDiscountTypeText>
  <!-- Row charge 0..n -->
  <RowChargeDetails> 
    <ReasonText>Charge #1</ReasonText>
    <Amount AmountCurrencyIdentifier="EUR">50,00</Amount>
  </RowChargeDetails>
  <RowVatRatePercent>24,00</RowVatRatePercent>
  <RowVatCode>S</RowVatCode>
  <RowVatAmount AmountCurrencyIdentifier="EUR">22,80</RowVatAmount>
  <RowVatExcludedAmount AmountCurrencyIdentifier="EUR">95,00</RowVatExcludedAmount>
  <RowAmount AmountCurrencyIdentifier="EUR">117,80</RowAmount>
</InvoiceRow>

The same row in credit note:

<InvoiceRow>
  <ArticleName>Article</ArticleName>
  <InvoicedQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="C62">-1,00</InvoicedQuantity>
  <UnitPriceAmount AmountCurrencyIdentifier="EUR" 
                   UnitPriceUnitCode="kpl" 
                   QuantityUnitCodeUN="C62">110,00</UnitPriceAmount>
  <UnitPriceDiscountAmount AmountCurrencyIdentifier="EUR">10,00</UnitPriceDiscountAmount> 
  <UnitPriceNetAmount AmountCurrencyIdentifier="EUR">100,00</UnitPriceNetAmount>
  <RowDiscountPercent>55,0</RowDiscountPercent>
  <RowDiscountAmount AmountCurrencyIdentifier="EUR">-55,00</RowDiscountAmount>
  <RowDiscountBaseAmount AmountCurrencyIdentifier="EUR">-100,00</RowDiscountBaseAmount>
  <RowDiscountTypeText>Discount #1</RowDiscountTypeText>
  <RowChargeDetails>
    <ReasonText>Charge #1</ReasonText>
    <Amount AmountCurrencyIdentifier="EUR">-50,00</Amount>
  </RowChargeDetails>
  <RowVatRatePercent>24,00</RowVatRatePercent>
  <RowVatCode>S</RowVatCode>
  <RowVatAmount AmountCurrencyIdentifier="EUR">-22,80</RowVatAmount>
  <RowVatExcludedAmount AmountCurrencyIdentifier="EUR">-95,00</RowVatExcludedAmount>
  <RowAmount AmountCurrencyIdentifier="EUR">-117,80</RowAmount>
</InvoiceRow>

Or the same row in credit note without row discounts and/or charges:

<InvoiceRow>
  <ArticleName>Article</ArticleName>
  <InvoicedQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="C62">-1,00</InvoicedQuantity>
  <UnitPriceAmount AmountCurrencyIdentifier="EUR"
                   UnitPriceUnitCode="kpl" 
                   QuantityUnitCodeUN="C62">95,00</UnitPriceAmount>
  <UnitPriceNetAmount AmountCurrencyIdentifier="EUR">95,00</UnitPriceNetAmount>
  <RowVatRatePercent>24,00</RowVatRatePercent>
  <RowVatCode>S</RowVatCode>
  <RowVatAmount AmountCurrencyIdentifier="EUR">-22,80</RowVatAmount>
  <RowVatExcludedAmount AmountCurrencyIdentifier="EUR">-95,00</RowVatExcludedAmount>
  <RowAmount AmountCurrencyIdentifier="EUR">-117,80</RowAmount>
</InvoiceRow>

Resolving invoice recipient

Background

When invoice recipient details (InvoiceRecipientPartyDetails) are provided, we expect it to be the entity who should receive the invoice (via e-invoice, email or print).
There are requirements in Maventa side what details the entity should have in order to route it successfully:

  • Party name AND
  • Electronic address OR
  • Organisation number OR
  • Postal address (lines: post office, post code AND country code) OR
  • Email address

Issue

Invoice recipient details (InvoiceRecipientPartyDetails) are sometimes incomplete.

Fix

Complement invoice recipient from buyer details (BuyerPartyDetails) in Finvoice 1.x/2.x/3.0 versions if possible.

When

Invoice recipient details are complemented with buyer details when:

  • When invoice recipient does not have enough details (see requirements above)
  • When all given invoice recipient details match with buyer details (byte by byte, e.g NAME is not the same as Name)
  • When one or more invoice recipient details match with buyer details, but some of the values are different.
    • Allowed deviating details are:
      • Site code
      • Department
      • Contact person name
      • Contact person function
      • Contact person department
      • Email address
      • Phone number
  • When invoice recipient has only one detail given
    • Allowed details are:
      • Email address
      • Contact person name
      • Invoice recipient organisation unit number (OVT)
    • Email address and contact person name are considered as complementing details to be added on top of the buyer details
    • With OVT number there are several rules and conditions when it’s assumed to belong to buyer:
      • Buyer does not have OVT number
      • SOAP/To identifier or MesasgeTransmissionDetails/MessageReceiver/ToIdentifier does not exist or is equal with value
  • When none of invoice recipient details match with buyer, or buyer does not have these values
    • Allowed details are:
      • Site code
      • Department
      • Contact person name
      • Contact person function
      • Contact person department
      • Email address
      • Phone number

Other

Invoice recipient details are not complemented with buyer details when:

  • When invoice recipient has only following details (one or all)
    • Address post office (town)
    • Address post code
    • Address country code
    • Address country name

Example

<?xml version="1.0" encoding="ISO-8859-15"?>
<Finvoice Version="1.3">
  <InvoiceRecipientCommunicationDetails>
    <InvoiceRecipientPhoneNumberIdentifier>123456</InvoiceRecipientPhoneNumberIdentifier>
    <InvoiceRecipientEmailaddressIdentifier>email@email.com</InvoiceRecipientEmailaddressIdentifier>
  </InvoiceRecipientCommunicationDetails>
  <BuyerPartyDetails>
    <BuyerPartyIdentifier>3333333-3</BuyerPartyIdentifier>
    <BuyerOrganisationName>Name1</BuyerOrganisationName>
    <BuyerOrganisationName>Name2</BuyerOrganisationName>
    <BuyerOrganisationTaxCode>FI33333333</BuyerOrganisationTaxCode>
    <BuyerPostalAddressDetails>
      <BuyerStreetName>StreetName</BuyerStreetName>
      <BuyerTownName>TownName</BuyerTownName>
      <BuyerPostCodeIdentifier>11111</BuyerPostCodeIdentifier>
      <CountryCode>FI</CountryCode>
      <CountryName>Finland</CountryName>
    </BuyerPostalAddressDetails>
  </BuyerPartyDetails>
  <BuyerCommunicationDetails>
    <BuyerPhoneNumberIdentifier>123456</BuyerPhoneNumberIdentifier>
    <BuyerEmailaddressIdentifier>email@email.com</BuyerEmailaddressIdentifier>
  </BuyerCommunicationDetails>
  <InvoiceDetails>
    <InvoiceTypeCode>INV01</InvoiceTypeCode>
  </InvoiceDetails>
</Finvoice>

Output

<?xml version="1.0" encoding="ISO-8859-15"?>
<Finvoice Version="1.3">
  <InvoiceRecipientPartyDetails>
    <InvoiceRecipientPartyIdentifier>3333333-3</InvoiceRecipientPartyIdentifier>
    <InvoiceRecipientOrganisationName>Name1</InvoiceRecipientOrganisationName>
    <InvoiceRecipientOrganisationName>Name2</InvoiceRecipientOrganisationName>
    <InvoiceRecipientOrganisationTaxCode>FI33333333</InvoiceRecipientOrganisationTaxCode>
    <InvoiceRecipientPostalAddressDetails>
      <InvoiceRecipientStreetName>StreetName</InvoiceRecipientStreetName>
      <InvoiceRecipientTownName>TownName</InvoiceRecipientTownName>
      <InvoiceRecipientPostCodeIdentifier>11111</InvoiceRecipientPostCodeIdentifier>
      <CountryCode>FI</CountryCode>
      <CountryName>Finland</CountryName>
    </BuyerPostalAddressDetails>
  </InvoiceRecipientPartyDetails>
  <InvoiceRecipientCommunicationDetails>
    <InvoiceRecipientPhoneNumberIdentifier>123456</InvoiceRecipientPhoneNumberIdentifier>
    <InvoiceRecipientEmailaddressIdentifier>email@email.com</InvoiceRecipientEmailaddressIdentifier>
  </InvoiceRecipientCommunicationDetails>
  <BuyerPartyDetails>
    <BuyerPartyIdentifier>3333333-3</BuyerPartyIdentifier>
    <BuyerOrganisationName>Name1</BuyerOrganisationName>
    <BuyerOrganisationName>Name2</BuyerOrganisationName>
    <BuyerOrganisationTaxCode>FI33333333</BuyerOrganisationTaxCode>
    <BuyerPostalAddressDetails>
      <BuyerStreetName>StreetName</BuyerStreetName>
      <BuyerTownName>TownName</BuyerTownName>
      <BuyerPostCodeIdentifier>11111</BuyerPostCodeIdentifier>
      <CountryCode>FI</CountryCode>
      <CountryName>Finland</CountryName>
    </BuyerPostalAddressDetails>
  </BuyerPartyDetails>
  <BuyerCommunicationDetails>
    <BuyerPhoneNumberIdentifier>123456</BuyerPhoneNumberIdentifier>
    <BuyerEmailaddressIdentifier>email@email.com</BuyerEmailaddressIdentifier>
  </BuyerCommunicationDetails>
  <InvoiceDetails>
    <InvoiceTypeCode>INV01</InvoiceTypeCode>
  </InvoiceDetails>
</Finvoice>

Many ways of discounts

There are many ways to give discounts in Finvoice. Here is a complete invoice with multiple invoice rows with different discounts. Note that the invoice is not EN16931 valid since the total amounts in the InvoiceDetails and EpiDetails element are not inline with the invoice rows.

<?xml version="1.0" encoding="ISO-8859-15"?>
<Finvoice Version="3.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:noNamespaceSchemaLocation="Finvoice3.0.xsd">
  <MessageTransmissionDetails>
    <MessageSenderDetails>
      <FromIdentifier>003721291126</FromIdentifier>
      <FromIntermediator>003721291126</FromIntermediator>
    </MessageSenderDetails>
    <MessageReceiverDetails>
      <ToIdentifier>003721291126</ToIdentifier>
      <ToIntermediator>003721291126</ToIntermediator>
    </MessageReceiverDetails>
    <MessageDetails>
      <MessageIdentifier>9958</MessageIdentifier>
      <MessageTimeStamp>2021-04-23T13:23:35</MessageTimeStamp>
      <SpecificationIdentifier>EN16931</SpecificationIdentifier>
    </MessageDetails>
  </MessageTransmissionDetails>
  <SellerPartyDetails>
    <SellerPartyIdentifier>2129112-6</SellerPartyIdentifier>
    <SellerPartyIdentifierUrlText>http://www.ytj.fi</SellerPartyIdentifierUrlText>
    <SellerOrganisationName>Testiyritys Oy</SellerOrganisationName>
    <SellerOrganisationTaxCode>FI21291126</SellerOrganisationTaxCode>
    <SellerPostalAddressDetails>
      <SellerStreetName>Pasilan asema-aukio 1</SellerStreetName>
      <SellerTownName>Helsinki</SellerTownName>
      <SellerPostCodeIdentifier>00520</SellerPostCodeIdentifier>
      <CountryCode>FI</CountryCode>
    </SellerPostalAddressDetails>
  </SellerPartyDetails>
  <SellerOrganisationUnitNumber>003721291126</SellerOrganisationUnitNumber>
  <SellerContactPersonName>Tuki</SellerContactPersonName>
  <SellerInformationDetails>
    <SellerHomeTownName>Helsinki</SellerHomeTownName>
    <SellerPhoneNumber>+3580501234567</SellerPhoneNumber>
    <SellerAccountDetails>
      <SellerAccountID IdentificationSchemeName="IBAN">FI8555360620029704</SellerAccountID>
      <SellerBic IdentificationSchemeName="BIC">OKOYFIHH</SellerBic>
    </SellerAccountDetails>
  </SellerInformationDetails>
  <InvoiceRecipientPartyDetails>
    <InvoiceRecipientOrganisationName>Testi vastaanottaja</InvoiceRecipientOrganisationName>
    <InvoiceRecipientCode>1001</InvoiceRecipientCode>
    <InvoiceRecipientPostalAddressDetails>
      <InvoiceRecipientStreetName>Pasilan asema-aukio 1</InvoiceRecipientStreetName>
      <InvoiceRecipientTownName>Helsinki</InvoiceRecipientTownName>
      <InvoiceRecipientPostCodeIdentifier>00520</InvoiceRecipientPostCodeIdentifier>
      <CountryCode>FI</CountryCode>
    </InvoiceRecipientPostalAddressDetails>
  </InvoiceRecipientPartyDetails>
  <InvoiceRecipientLanguageCode>fi</InvoiceRecipientLanguageCode>
  <InvoiceRecipientCommunicationDetails>
    <InvoiceRecipientPhoneNumberIdentifier>+3580501234567</InvoiceRecipientPhoneNumberIdentifier>
  </InvoiceRecipientCommunicationDetails>
  <BuyerPartyDetails>
    <BuyerOrganisationName>Testi ostaja</BuyerOrganisationName>
    <BuyerCode>1001</BuyerCode>
    <BuyerPostalAddressDetails>
      <BuyerStreetName>Pasilan asema-aukio 1</BuyerStreetName>
      <BuyerTownName>Helsinki</BuyerTownName>
      <BuyerPostCodeIdentifier>00520</BuyerPostCodeIdentifier>
      <CountryCode>FI</CountryCode>
    </BuyerPostalAddressDetails>
  </BuyerPartyDetails>
  <InvoiceDetails>
    <InvoiceTypeCode>INV01</InvoiceTypeCode>
    <InvoiceTypeCodeUN>380</InvoiceTypeCodeUN>
    <InvoiceTypeText>LASKU</InvoiceTypeText>
    <OriginCode>Original</OriginCode>
    <InvoiceNumber>9958</InvoiceNumber>
    <InvoiceDate Format="CCYYMMDD">20211012</InvoiceDate>
    <SellersBuyerIdentifier>1001</SellersBuyerIdentifier>
    <SalesPersonName>Myyjä</SalesPersonName>
    <RowsTotalVatExcludedAmount AmountCurrencyIdentifier="EUR">40,32</RowsTotalVatExcludedAmount>
    <InvoiceTotalVatExcludedAmount AmountCurrencyIdentifier="EUR">40,32</InvoiceTotalVatExcludedAmount>
    <InvoiceTotalVatAmount AmountCurrencyIdentifier="EUR">9,68</InvoiceTotalVatAmount>
    <InvoiceTotalVatIncludedAmount AmountCurrencyIdentifier="EUR">50,00</InvoiceTotalVatIncludedAmount>
    <VatSpecificationDetails>
      <VatBaseAmount AmountCurrencyIdentifier="EUR">40,32</VatBaseAmount>
      <VatRatePercent>24,00</VatRatePercent>
      <VatCode>S</VatCode>
      <VatRateAmount AmountCurrencyIdentifier="EUR">9,68</VatRateAmount>
    </VatSpecificationDetails>
    <PaymentTermsDetails>
      <PaymentTermsFreeText>30 pv netto</PaymentTermsFreeText>
      <InvoiceDueDate Format="CCYYMMDD">20210523</InvoiceDueDate>
      <PaymentOverDueFineDetails>
        <PaymentOverDueFinePercent>7,50</PaymentOverDueFinePercent>
      </PaymentOverDueFineDetails>
    </PaymentTermsDetails>
  </InvoiceDetails>

  <!-- Invoice row without any discounts and charges -->
  <InvoiceRow>
    <ArticleName>Article</ArticleName>
    <DeliveredQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="EA">1,00</DeliveredQuantity>
    <InvoicedQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="EA">1,00</InvoicedQuantity>
    <UnitPriceAmount AmountCurrencyIdentifier="EUR">80,64516</UnitPriceAmount>
    <UnitPriceNetAmount AmountCurrencyIdentifier="EUR">80,64516</UnitPriceNetAmount>
    <RowPositionIdentifier>1</RowPositionIdentifier>
    <RowSellerAccountText>3000</RowSellerAccountText>
    <RowVatRatePercent>24,00</RowVatRatePercent>
    <RowVatCode>S</RowVatCode>
    <RowVatAmount AmountCurrencyIdentifier="EUR">19,36</RowVatAmount>
    <RowVatExcludedAmount AmountCurrencyIdentifier="EUR">80,65</RowVatExcludedAmount>
    <RowAmount AmountCurrencyIdentifier="EUR">100,01</RowAmount>
  </InvoiceRow>

  <!-- Invoice row with row discount -->
  <InvoiceRow>
    <ArticleName>Article</ArticleName>
    <DeliveredQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="EA">1,00</DeliveredQuantity>
    <InvoicedQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="EA">1,00</InvoicedQuantity>
    <UnitPriceAmount AmountCurrencyIdentifier="EUR">80,64516</UnitPriceAmount>
    <UnitPriceNetAmount AmountCurrencyIdentifier="EUR">80,64516</UnitPriceNetAmount>
    <RowPositionIdentifier>1</RowPositionIdentifier>
    <RowSellerAccountText>3000</RowSellerAccountText>
    <RowDiscountPercent>50,00</RowDiscountPercent>
    <RowDiscountAmount AmountCurrencyIdentifier="EUR">40,33</RowDiscountAmount>
    <RowDiscountBaseAmount AmountCurrencyIdentifier="EUR">80,65</RowDiscountBaseAmount>
    <RowDiscountTypeCode>95</RowDiscountTypeCode>
    <RowVatRatePercent>24,00</RowVatRatePercent>
    <RowVatCode>S</RowVatCode>
    <RowVatAmount AmountCurrencyIdentifier="EUR">9,68</RowVatAmount>
    <RowVatExcludedAmount AmountCurrencyIdentifier="EUR">40,32</RowVatExcludedAmount>
    <RowAmount AmountCurrencyIdentifier="EUR">50,00</RowAmount>
  </InvoiceRow>

  <!-- Invoice row with unit discount -->
  <InvoiceRow>
    <ArticleName>Article</ArticleName>
    <DeliveredQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="EA">1,00</DeliveredQuantity>
    <InvoicedQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="EA">1,00</InvoicedQuantity>
    <UnitPriceAmount AmountCurrencyIdentifier="EUR">80,64516</UnitPriceAmount>
    <UnitPriceDiscountAmount AmountCurrencyIdentifier="EUR">40,32258</UnitPriceDiscountAmount>
    <UnitPriceNetAmount AmountCurrencyIdentifier="EUR">40,32258</UnitPriceNetAmount>
    <RowPositionIdentifier>1</RowPositionIdentifier>
    <RowSellerAccountText>3000</RowSellerAccountText>
    <RowVatRatePercent>24,00</RowVatRatePercent>
    <RowVatCode>S</RowVatCode>
    <RowVatAmount AmountCurrencyIdentifier="EUR">9,68</RowVatAmount>
    <RowVatExcludedAmount AmountCurrencyIdentifier="EUR">40,32</RowVatExcludedAmount>
    <RowAmount AmountCurrencyIdentifier="EUR">50,00</RowAmount>
  </InvoiceRow>

  <!-- Invoice row with unit discount and with one row discount -->
  <InvoiceRow>
    <ArticleName>Article</ArticleName>
    <DeliveredQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="EA">1,00</DeliveredQuantity>
    <InvoicedQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="EA">1,00</InvoicedQuantity>
    <UnitPriceAmount AmountCurrencyIdentifier="EUR">80,64516</UnitPriceAmount>
    <UnitPriceDiscountAmount AmountCurrencyIdentifier="EUR">40,32258</UnitPriceDiscountAmount>
    <UnitPriceNetAmount AmountCurrencyIdentifier="EUR">40,32258</UnitPriceNetAmount>
    <RowPositionIdentifier>1</RowPositionIdentifier>
    <RowSellerAccountText>3000</RowSellerAccountText>
    <RowDiscountPercent>50,00</RowDiscountPercent>
    <RowDiscountAmount AmountCurrencyIdentifier="EUR">20,16</RowDiscountAmount>
    <RowDiscountBaseAmount AmountCurrencyIdentifier="EUR">40,32</RowDiscountBaseAmount>
    <RowDiscountTypeCode>95</RowDiscountTypeCode>
    <RowVatRatePercent>24,00</RowVatRatePercent>
    <RowVatCode>S</RowVatCode>
    <RowVatAmount AmountCurrencyIdentifier="EUR">4,84</RowVatAmount>
    <RowVatExcludedAmount AmountCurrencyIdentifier="EUR">20,16</RowVatExcludedAmount>
    <RowAmount AmountCurrencyIdentifier="EUR">25,00</RowAmount>
  </InvoiceRow>

  <!-- Invoice row with multiple row discounts and with one fixed discount -->
  <InvoiceRow>
    <ArticleName>Article</ArticleName>
    <DeliveredQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="EA">1,00</DeliveredQuantity>
    <InvoicedQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="EA">1,00</InvoicedQuantity>
    <UnitPriceAmount AmountCurrencyIdentifier="EUR">80,64516</UnitPriceAmount>
    <!-- UnitPriceAmount -->
    <UnitPriceNetAmount AmountCurrencyIdentifier="EUR">80,64516</UnitPriceNetAmount> 
    <RowPositionIdentifier>1</RowPositionIdentifier>
    <RowSellerAccountText>3000</RowSellerAccountText>
    <!-- First discount -->
    <RowProgressiveDiscountDetails>
      <RowDiscountPercent>50,00</RowDiscountPercent>
      <RowDiscountAmount AmountCurrencyIdentifier="EUR">40,33</RowDiscountAmount>
      <!-- UnitPriceNetAmount -->
      <RowDiscountBaseAmount AmountCurrencyIdentifier="EUR">80,65</RowDiscountBaseAmount> 
      <RowDiscountTypeCode>95</RowDiscountTypeCode>
    </RowProgressiveDiscountDetails>
    <!-- Second discount -->
    <RowProgressiveDiscountDetails> 
      <RowDiscountPercent>50,00</RowDiscountPercent>
      <RowDiscountAmount AmountCurrencyIdentifier="EUR">20,16</RowDiscountAmount>
      <!-- Previous RowDiscountBaseAmount - RowDiscountAmount total -->
      <RowDiscountBaseAmount AmountCurrencyIdentifier="EUR">40,32</RowDiscountBaseAmount> 
      <RowDiscountTypeCode>95</RowDiscountTypeCode>
    </RowProgressiveDiscountDetails>
    <!-- Third fixed discount -->
    <RowProgressiveDiscountDetails> 
      <RowDiscountAmount AmountCurrencyIdentifier="EUR">10,16</RowDiscountAmount>
      <!-- Previous RowDiscountBaseAmount - RowDiscountAmount total -->
      <RowDiscountBaseAmount AmountCurrencyIdentifier="EUR">20,16</RowDiscountBaseAmount> 
      <RowDiscountTypeCode>95</RowDiscountTypeCode>
    </RowProgressiveDiscountDetails>
    <RowVatRatePercent>24,00</RowVatRatePercent>
    <RowVatCode>S</RowVatCode>
    <RowVatAmount AmountCurrencyIdentifier="EUR">2,40</RowVatAmount>
    <RowVatExcludedAmount AmountCurrencyIdentifier="EUR">10,00</RowVatExcludedAmount>
    <RowAmount AmountCurrencyIdentifier="EUR">12,40</RowAmount>
  </InvoiceRow>

  <!-- Invoice row with unit discount and with multiple row discounts (Progressive) -->
  <InvoiceRow>
    <ArticleName>Article</ArticleName>
    <DeliveredQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="EA">1,00</DeliveredQuantity>
    <InvoicedQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="EA">1,00</InvoicedQuantity>
    <UnitPriceAmount AmountCurrencyIdentifier="EUR">80,64516</UnitPriceAmount>
    <UnitPriceDiscountAmount AmountCurrencyIdentifier="EUR">40,32258</UnitPriceDiscountAmount>
    <!-- UnitPriceAmount - UnitPriceDiscountAmount -->
    <UnitPriceNetAmount AmountCurrencyIdentifier="EUR">40,32258</UnitPriceNetAmount> 
    <RowPositionIdentifier>1</RowPositionIdentifier>
    <RowSellerAccountText>3000</RowSellerAccountText>
    <!-- First discount -->
    <RowProgressiveDiscountDetails> 
      <RowDiscountPercent>50,00</RowDiscountPercent>
      <RowDiscountAmount AmountCurrencyIdentifier="EUR">20,16</RowDiscountAmount>
      <!-- UnitPriceNetAmount -->
      <RowDiscountBaseAmount AmountCurrencyIdentifier="EUR">40,32</RowDiscountBaseAmount> 
      <RowDiscountTypeCode>95</RowDiscountTypeCode>
    </RowProgressiveDiscountDetails>
    <!-- Second discount -->
    <RowProgressiveDiscountDetails> 
      <RowDiscountPercent>50,00</RowDiscountPercent>
      <RowDiscountAmount AmountCurrencyIdentifier="EUR">10,08</RowDiscountAmount>
      <!-- Previous RowDiscountBaseAmount - RowDiscountAmount total -->
      <RowDiscountBaseAmount AmountCurrencyIdentifier="EUR">20,16</RowDiscountBaseAmount> 
      <RowDiscountTypeCode>95</RowDiscountTypeCode>
    </RowProgressiveDiscountDetails>
    <RowVatRatePercent>24,00</RowVatRatePercent>
    <RowVatCode>S</RowVatCode>
    <RowVatAmount AmountCurrencyIdentifier="EUR">2,42</RowVatAmount>
    <RowVatExcludedAmount AmountCurrencyIdentifier="EUR">10,08</RowVatExcludedAmount>
    <RowAmount AmountCurrencyIdentifier="EUR">12,50</RowAmount>
  </InvoiceRow>

  <!-- Invoice row with unit discount, one row discount and row charge -->
  <InvoiceRow>
    <ArticleName>Article</ArticleName>
    <InvoicedQuantity QuantityUnitCode="kpl" QuantityUnitCodeUN="C62">1,00</InvoicedQuantity>
    <UnitPriceAmount AmountCurrencyIdentifier="EUR" 
                     UnitPriceUnitCode="kpl" 
                     QuantityUnitCodeUN="C62">110,00</UnitPriceAmount>
    <!-- Unit discount -->
    <UnitPriceDiscountAmount AmountCurrencyIdentifier="EUR">10,00</UnitPriceDiscountAmount> 
    <UnitPriceNetAmount AmountCurrencyIdentifier="EUR">100,00</UnitPriceNetAmount>
    <!-- Row discount -->
    <RowDiscountPercent>55,0</RowDiscountPercent> 
    <RowDiscountAmount AmountCurrencyIdentifier="EUR">55,00</RowDiscountAmount>
    <RowDiscountBaseAmount AmountCurrencyIdentifier="EUR">100,00</RowDiscountBaseAmount>
    <RowDiscountTypeText>Discount #1</RowDiscountTypeText>
    <!-- One row charge (0..n) -->
    <RowChargeDetails> 
      <ReasonText>Charge #1</ReasonText>
      <Amount AmountCurrencyIdentifier="EUR">45,00</Amount>
    </RowChargeDetails>
    <RowVatRatePercent>24,00</RowVatRatePercent>
    <RowVatCode>S</RowVatCode>
    <RowVatAmount AmountCurrencyIdentifier="EUR">22,80</RowVatAmount>
    <RowVatExcludedAmount AmountCurrencyIdentifier="EUR">95,00</RowVatExcludedAmount>
    <RowAmount AmountCurrencyIdentifier="EUR">117,80</RowAmount>
  </InvoiceRow>

  <EpiDetails>
    <EpiIdentificationDetails>
      <EpiDate Format="CCYYMMDD">20211012</EpiDate>
      <EpiReference>202100000099586</EpiReference>
    </EpiIdentificationDetails>
    <EpiPartyDetails>
      <EpiBfiPartyDetails>
        <EpiBfiIdentifier IdentificationSchemeName="BIC">OKOYFIHH</EpiBfiIdentifier>
      </EpiBfiPartyDetails>
      <EpiBeneficiaryPartyDetails>
        <EpiNameAddressDetails>Testiyritys Oy</EpiNameAddressDetails>
        <EpiBei>2129112-6</EpiBei>
        <EpiAccountID IdentificationSchemeName="IBAN">FI8555360320069704</EpiAccountID>
      </EpiBeneficiaryPartyDetails>
    </EpiPartyDetails>
    <EpiPaymentInstructionDetails>
      <EpiRemittanceInfoIdentifier IdentificationSchemeName="SPY">202100000099586</EpiRemittanceInfoIdentifier>
      <EpiInstructedAmount AmountCurrencyIdentifier="EUR">50,00</EpiInstructedAmount>
      <EpiCharge ChargeOption="SHA"/>
      <EpiDateOptionDate Format="CCYYMMDD">20210523</EpiDateOptionDate>
      <EpiPaymentMeansCode>58</EpiPaymentMeansCode>
    </EpiPaymentInstructionDetails>
  </EpiDetails>
</Finvoice>