<?xml version='1.0' encoding='UTF-8' ?>
<!-- English disclaimer below.-->
 
<!--Right of use 
ZUGFeRD Data format version 2.3.0, September 18th, 2024
 
In detail, the grant of use includes 
=====================================
 
FeRD grants a license for the use of the copyrighted ZUGFeRD data format in the respective 
valid and accepted version (www.ferd-net.de). 
The license includes an irrevocable right of use including the right of further development, 
Further processing and connection with other products.
The license applies in particular to the development, design, production, sale, use or 
other use of the ZUGFeRD data format for hardware and/or software products and other 
applications and services. 
This license does not include the essential patents of the members of FeRD. The essential patents are patents 
and patent applications worldwide which contain one or more claims that are 
necessary claims. Necessary claims are only those claims of the essential patents which are 
the implementation of the ZUGFeRD data format would necessarily be violated. 
The Licensee is entitled to provide its respective group companies with an unlimited, worldwide, non-transferable, 
irrevocable right of use including the right of further development, further processing and connection with 
other products. 
 
The license is provided free of charge. 
 
Except in the case of intentional fault or gross negligence, FeRD is not liable for loss of use, loss of 
Profit, loss of data, loss of communication, loss of revenue, loss of contracts, loss of business or for costs 
damages, losses or liabilities in connection with an interruption of business, nor for concrete, 
incidental, indirect, punitive or consequential damages, even if the possibility of 
costs, losses or damages could normally have been foreseen.-->

<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
  <rsm:ExchangedDocumentContext>
    <ram:GuidelineSpecifiedDocumentContextParameter>
        <ram:ID>urn:cen.eu:en16931:2017</ram:ID>
    </ram:GuidelineSpecifiedDocumentContextParameter>
  </rsm:ExchangedDocumentContext>
  
  {{#doc}} 
  <rsm:ExchangedDocument>
    <ram:ID>{{id}}</ram:ID>
    <ram:TypeCode>{{code}}</ram:TypeCode>
    <ram:IssueDateTime>
      <udt:DateTimeString format="102">{{date}}</udt:DateTimeString>
    </ram:IssueDateTime>

    {{#note}}
    <ram:IncludedNote>
      <ram:Content>{{cont}}</ram:Content>
      {{#scode}}<ram:SubjectCode>{{.}}</ram:SubjectCode> {{/scode}}
    </ram:IncludedNote>
    {{/note}}        
  </rsm:ExchangedDocument>
  {{/doc}}  


  <rsm:SupplyChainTradeTransaction>
    {{#line}}
    <ram:IncludedSupplyChainTradeLineItem>
      <ram:AssociatedDocumentLineDocument>
        <ram:LineID>{{id}}</ram:LineID>
      </ram:AssociatedDocumentLineDocument>
      <ram:SpecifiedTradeProduct>
        <ram:GlobalID schemeID="0160">{{gid}}</ram:GlobalID>
        <ram:Name>{{name}}</ram:Name>
      </ram:SpecifiedTradeProduct>
      <ram:SpecifiedLineTradeAgreement>
        <ram:GrossPriceProductTradePrice>
          <ram:ChargeAmount>{{gross}}</ram:ChargeAmount>
          {{! BT-147: Item price discount to avoid the validator's [VD-Valitool-154] warning. }}
          <ram:AppliedTradeAllowanceCharge>
            <ram:ChargeIndicator>
              <udt:Indicator>false</udt:Indicator>
            </ram:ChargeIndicator>
            <ram:ActualAmount>0.00</ram:ActualAmount>
          </ram:AppliedTradeAllowanceCharge>          
        </ram:GrossPriceProductTradePrice>      
        <ram:NetPriceProductTradePrice>
          <ram:ChargeAmount>{{price}}</ram:ChargeAmount>
        </ram:NetPriceProductTradePrice>
      </ram:SpecifiedLineTradeAgreement>
      <ram:SpecifiedLineTradeDelivery>
        <ram:BilledQuantity unitCode="{{unit}}">{{qty}}</ram:BilledQuantity>
      </ram:SpecifiedLineTradeDelivery>
      <ram:SpecifiedLineTradeSettlement>
        <ram:ApplicableTradeTax>
          <ram:TypeCode>VAT</ram:TypeCode>
          <ram:CategoryCode>S</ram:CategoryCode>
          <ram:RateApplicablePercent>{{vatrate}}</ram:RateApplicablePercent>
        </ram:ApplicableTradeTax>
        <ram:SpecifiedTradeSettlementLineMonetarySummation>
          <ram:LineTotalAmount>{{total}}</ram:LineTotalAmount>
        </ram:SpecifiedTradeSettlementLineMonetarySummation>
      </ram:SpecifiedLineTradeSettlement>
    </ram:IncludedSupplyChainTradeLineItem>
    {{/line}}


    <ram:ApplicableHeaderTradeAgreement>
      {{#seller}}
      <ram:SellerTradeParty>
		    <ram:ID>{{id}}</ram:ID>
        <ram:GlobalID schemeID="0088">{{gid}}</ram:GlobalID>      
        <ram:Name>{{name}}</ram:Name>
        <ram:PostalTradeAddress>
          <ram:PostcodeCode>{{post}}</ram:PostcodeCode>
          <ram:LineOne>{{line1}}</ram:LineOne>
          <ram:CityName>{{city}}</ram:CityName>
          <ram:CountryID>{{country}}</ram:CountryID>
        </ram:PostalTradeAddress>
        <ram:SpecifiedTaxRegistration>
          <ram:ID schemeID="FC">{{regid}}</ram:ID>
        </ram:SpecifiedTaxRegistration>
        <ram:SpecifiedTaxRegistration>
          <ram:ID schemeID="VA">{{vatid}}</ram:ID>
        </ram:SpecifiedTaxRegistration>
      </ram:SellerTradeParty>
      {{/seller}}
      {{#buyer}}
      <ram:BuyerTradeParty>
        <ram:Name>{{name}}</ram:Name>
        <ram:PostalTradeAddress>
          <ram:PostcodeCode>{{post}}</ram:PostcodeCode>
          <ram:LineOne>{{line1}}</ram:LineOne>
          <ram:LineTwo>{{line2}}</ram:LineTwo>          
          <ram:CityName>{{city}}</ram:CityName>
          <ram:CountryID>{{country}}</ram:CountryID>
        </ram:PostalTradeAddress>
      </ram:BuyerTradeParty>
      {{/buyer}}
    </ram:ApplicableHeaderTradeAgreement>

    
    {{#ahtd}}    
    <ram:ApplicableHeaderTradeDelivery>
      <ram:ActualDeliverySupplyChainEvent>
        <ram:OccurrenceDateTime>
          <udt:DateTimeString format="102">{{date}}</udt:DateTimeString>
        </ram:OccurrenceDateTime>
      </ram:ActualDeliverySupplyChainEvent>
    </ram:ApplicableHeaderTradeDelivery>
    {{/ahtd}}    

    {{#ahts}}
    <ram:ApplicableHeaderTradeSettlement>
      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
      {{#vat}}
      <ram:ApplicableTradeTax>
        <ram:CalculatedAmount>{{tax}}</ram:CalculatedAmount>
        <ram:TypeCode>VAT</ram:TypeCode>
        <ram:BasisAmount>{{basis}}</ram:BasisAmount>
        <ram:CategoryCode>S</ram:CategoryCode>
        <ram:RateApplicablePercent>{{rate}}</ram:RateApplicablePercent>
      </ram:ApplicableTradeTax>
      {{/vat}}

      <ram:SpecifiedTradePaymentTerms>
        <ram:Description>{{desc}}</ram:Description>      
        <ram:DueDateDateTime>
          <udt:DateTimeString format="102">{{duedate}}</udt:DateTimeString>
        </ram:DueDateDateTime>          
      </ram:SpecifiedTradePaymentTerms>

      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>
        <ram:LineTotalAmount>{{ltotal}}</ram:LineTotalAmount>
        <ram:ChargeTotalAmount>0.00</ram:ChargeTotalAmount>
        <ram:AllowanceTotalAmount>0.00</ram:AllowanceTotalAmount>
        <ram:TaxBasisTotalAmount>{{btotal}}</ram:TaxBasisTotalAmount>
        <ram:TaxTotalAmount currencyID="EUR">{{tax}}</ram:TaxTotalAmount>
        <ram:GrandTotalAmount>{{gtotal}}</ram:GrandTotalAmount>
        <ram:TotalPrepaidAmount>{{prepaid}}</ram:TotalPrepaidAmount>        
        <ram:DuePayableAmount>{{due}}</ram:DuePayableAmount>
      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
    </ram:ApplicableHeaderTradeSettlement>
    {{/ahts}}
  </rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>