-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #33 -- Fix order of EffectiveSpecifiedPeriod
- Loading branch information
Showing
2 changed files
with
346 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
345 changes: 345 additions & 0 deletions
345
tests/samples/zugferd_2p1_EXTENDED_Fremdwaehrung-CUSTOM-PeriodAndNote.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,345 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- English disclaimer below.--> | ||
<!--Nutzungsrechte | ||
ZUGFeRD Datenformat Version 2.1.1, 01.07.2020 | ||
Beispiel Version 01.07.2020 | ||
Zweck des Forums elektronisch Rechnung Deutschland, welches am 31. März 2010 unter der Arbeitsgemeinschaft für | ||
wirtschaftliche Verwaltung e. V. gegründet wurde, ist u. a. die Schaffung und Spezifizierung eines offenen Datenformats | ||
für strukturierten elektronischen Datenaustausch auf der Grundlage offener und nicht diskriminierender, standardisierter | ||
Technologien („ZUGFeRD Datenformat“). | ||
Das ZUGFeRD Datenformat wird nach Maßgabe des FeRD sowohl Unternehmen als auch der öffentlichen Verwaltung | ||
frei zugänglich gemacht. Hierfür bietet FeRD allen Unternehmen und Organisationen der öffentlichen Verwaltung eine | ||
Lizenz für die Nutzung des urheberrechtlich geschützten ZUGFeRD-Datenformats zu fairen, sachgerechten und nicht | ||
diskriminierenden Bedingungen an. | ||
Die Spezifikation des FeRD zur Implementierung des ZUGFeRD Datenformats ist in ihrer jeweils geltenden Fassung | ||
abrufbar unter www.ferd-net.de. | ||
Im Einzelnen schließt die Nutzungsgewährung ein: | ||
===================================== | ||
FeRD räumt eine Lizenz für die Nutzung des urheberrechtlich geschützten ZUGFeRD Datenformats in der jeweils | ||
geltenden und akzeptierten Fassung (www.ferd-net.de) ein. | ||
Die Lizenz beinhaltet ein unwiderrufliches Nutzungsrecht einschließlich des Rechts der Weiterentwicklung, | ||
Weiterbearbeitung und Verbindung mit anderen Produkten. | ||
Die Lizenz gilt insbesondere für die Entwicklung, die Gestaltung, die Herstellung, den Verkauf, die Nutzung oder | ||
anderweitige Verwendung des ZUGFeRD Datenformats für Hardware- und/oder Softwareprodukte sowie sonstige | ||
Anwendungen und Dienste. | ||
Diese Lizenz schließt nicht die wesentlichen Patente der Mitglieder von FeRD ein. Als wesentliche Patente sind Patente | ||
und Patentanmeldungen weltweit zu verstehen, die einen oder mehrere Patentansprüche beinhalten, bei denen es sich um | ||
notwendige Ansprüche handelt. Notwendige Ansprüche sind lediglich jene Ansprüche der Wesentlichen Patente, die durch | ||
die Implementierung des ZUGFeRD Datenformats notwendigerweise verletzt würden. | ||
Der Lizenznehmer ist berechtigt, seinen jeweiligen Konzerngesellschaften ein unbefristetes, weltweites, nicht übertragbares, | ||
unwiderrufliches Nutzungsrecht einschließlich des Rechts der Weiterentwicklung, Weiterbearbeitung und Verbindung mit | ||
anderen Produkten einzuräumen. | ||
Die Lizenz wird kostenfrei zur Verfügung gestellt. | ||
Außer im Falle vorsätzlichen Verschuldens oder grober Fahrlässigkeit haftet FeRD weder für Nutzungsausfall, entgangenen | ||
Gewinn, Datenverlust, Kommunikationsverlust, Einnahmeausfall, Vertragseinbußen, Geschäftsausfall oder für Kosten, | ||
Schäden, Verluste oder Haftpflichten im Zusammenhang mit einer Unterbrechung der Geschäftstätigkeit, noch für konkrete, | ||
beiläufig entstandene, mittelbare Schäden, Straf- oder Folgeschäden und zwar auch dann nicht, wenn die Möglichkeit der | ||
Kosten, Verluste bzw. Schäden hätte normalerweise vorhergesehen werden können.--> | ||
|
||
<!--Right of use | ||
ZUGFeRD Data format version 2.1.1, July 1, 2020 | ||
The purpose of the Forum elektronische Rechnung Deutschland (FeRD), which was founded on March 31, 2010 under the | ||
umbrella of Arbeitsgemeinschaft für wirtschaftliche Verwaltung e. V., is, among other things, to create and specify an | ||
open data format for structured electronic data exchange on the basis of open and non discriminatory, standardised | ||
technologies ("ZUGFeRD data format"). | ||
The ZUGFeRD data format is used by both companies and public administration according to the FeRD | ||
made freely accessible. For this purpose FeRD offers all companies and organisations of the public administration a | ||
License to use the copyrighted ZUGFeRD data format in a fair, appropriate and non | ||
discriminatory conditions. | ||
The specification of the FeRD for the implementation of the ZUGFeRD data format is, in its currently valid version | ||
available at www.ferd-net.de. | ||
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:a="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:10" 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:BusinessProcessSpecifiedDocumentContextParameter> | ||
<ram:ID>Beispielgeschäftsprozess</ram:ID> | ||
</ram:BusinessProcessSpecifiedDocumentContextParameter> | ||
<ram:GuidelineSpecifiedDocumentContextParameter> | ||
<ram:ID>urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended</ram:ID> | ||
</ram:GuidelineSpecifiedDocumentContextParameter> | ||
</rsm:ExchangedDocumentContext> | ||
<rsm:ExchangedDocument> | ||
<ram:ID>47110815</ram:ID> | ||
<ram:Name>RECHNUNG</ram:Name> | ||
<ram:TypeCode>380</ram:TypeCode> | ||
<ram:IssueDateTime> | ||
<udt:DateTimeString format="102">20181031</udt:DateTimeString> | ||
</ram:IssueDateTime> | ||
<ram:IncludedNote> | ||
<ram:Content>Mitglieder der Geschäftsleitung | ||
H. Meier Geschäftsführer | ||
T. Müller Prokurist | ||
HRB Braunschweig 12345</ram:Content> | ||
<ram:SubjectCode>REG</ram:SubjectCode> | ||
</ram:IncludedNote> | ||
<ram:IncludedNote> | ||
<ram:Content>Vom 17. Dezember 2018 bis 6. Januar 2019 haben wir Betriebsferien.</ram:Content> | ||
<ram:SubjectCode>AAI</ram:SubjectCode> | ||
</ram:IncludedNote> | ||
<ram:IncludedNote> | ||
<ram:Content>Aus konzern-internen Gründen wird der Steuerbetrag sowohl in der Rechungswährung (EUR) als auch in der Buchwährung (GBP) ausgegeben.</ram:Content> | ||
<ram:SubjectCode>TXD</ram:SubjectCode> | ||
</ram:IncludedNote> | ||
<ram:EffectiveSpecifiedPeriod> | ||
<ram:CompleteDateTime> | ||
<udt:DateTimeString format="102">20240906</udt:DateTimeString> | ||
</ram:CompleteDateTime> | ||
</ram:EffectiveSpecifiedPeriod> | ||
</rsm:ExchangedDocument> | ||
<rsm:SupplyChainTradeTransaction> | ||
<ram:IncludedSupplyChainTradeLineItem> | ||
<ram:AssociatedDocumentLineDocument> | ||
<ram:LineID>1</ram:LineID> | ||
<ram:IncludedNote> | ||
<ram:Content>Materialzertifikat X-234 gem ISO XYZ. | ||
Ware bleibt bis zur vollständigen Bezahlung unser Eigentum. | ||
</ram:Content> | ||
</ram:IncludedNote> | ||
</ram:AssociatedDocumentLineDocument> | ||
<ram:SpecifiedTradeProduct> | ||
<ram:SellerAssignedID>CO-123/V2A</ram:SellerAssignedID> | ||
<ram:BuyerAssignedID>Toolbox 0815</ram:BuyerAssignedID> | ||
<ram:Name>Stahlcoil</ram:Name> | ||
<ram:OriginTradeCountry> | ||
<ram:ID>DE</ram:ID> | ||
</ram:OriginTradeCountry> | ||
</ram:SpecifiedTradeProduct> | ||
<ram:SpecifiedLineTradeAgreement> | ||
<ram:BuyerOrderReferencedDocument> | ||
<ram:IssuerAssignedID>ORDER84359</ram:IssuerAssignedID> | ||
<ram:LineID>1</ram:LineID> | ||
</ram:BuyerOrderReferencedDocument> | ||
<ram:GrossPriceProductTradePrice> | ||
<ram:ChargeAmount>100.00</ram:ChargeAmount> | ||
<ram:BasisQuantity unitCode="H87">1</ram:BasisQuantity> | ||
</ram:GrossPriceProductTradePrice> | ||
<ram:NetPriceProductTradePrice> | ||
<ram:ChargeAmount>100</ram:ChargeAmount> | ||
<ram:BasisQuantity unitCode="H87">1</ram:BasisQuantity> | ||
</ram:NetPriceProductTradePrice> | ||
</ram:SpecifiedLineTradeAgreement> | ||
<ram:SpecifiedLineTradeDelivery> | ||
<ram:BilledQuantity unitCode="H87">10</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:SpecifiedTradeAllowanceCharge> | ||
<ram:ChargeIndicator> | ||
<udt:Indicator>false</udt:Indicator> | ||
</ram:ChargeIndicator> | ||
<ram:CalculationPercent>10</ram:CalculationPercent> | ||
<ram:BasisAmount>1000</ram:BasisAmount> | ||
<ram:ActualAmount>100</ram:ActualAmount> | ||
<ram:ReasonCode>CAO</ram:ReasonCode> | ||
<ram:Reason>Lagerware</ram:Reason> | ||
</ram:SpecifiedTradeAllowanceCharge> | ||
<ram:SpecifiedTradeAllowanceCharge> | ||
<ram:ChargeIndicator> | ||
<udt:Indicator>false</udt:Indicator> | ||
</ram:ChargeIndicator> | ||
<ram:BasisAmount>1000</ram:BasisAmount> | ||
<ram:ActualAmount>50</ram:ActualAmount> | ||
<ram:ReasonCode>ADZ</ram:ReasonCode> | ||
<ram:Reason>Direktbelieferung</ram:Reason> | ||
</ram:SpecifiedTradeAllowanceCharge> | ||
<ram:SpecifiedTradeSettlementLineMonetarySummation> | ||
<ram:LineTotalAmount>850</ram:LineTotalAmount> | ||
</ram:SpecifiedTradeSettlementLineMonetarySummation> | ||
</ram:SpecifiedLineTradeSettlement> | ||
</ram:IncludedSupplyChainTradeLineItem> | ||
<ram:ApplicableHeaderTradeAgreement> | ||
<ram:SellerTradeParty> | ||
<ram:ID>12345676</ram:ID> | ||
<ram:Name>Rohstoff AG Salzgitter</ram:Name> | ||
<ram:PostalTradeAddress> | ||
<ram:PostcodeCode>38226</ram:PostcodeCode> | ||
<ram:LineOne>Marktstr. 153</ram:LineOne> | ||
<ram:CityName>Salzgitter</ram:CityName> | ||
<ram:CountryID>DE</ram:CountryID> | ||
</ram:PostalTradeAddress> | ||
<ram:SpecifiedTaxRegistration> | ||
<ram:ID schemeID="VA">DE123456789</ram:ID> | ||
</ram:SpecifiedTaxRegistration> | ||
</ram:SellerTradeParty> | ||
<ram:BuyerTradeParty> | ||
<ram:ID>75969813</ram:ID> | ||
<ram:Name>Metallbau Leipzig GmbH & Co. KG</ram:Name> | ||
<ram:PostalTradeAddress> | ||
<ram:PostcodeCode>12345</ram:PostcodeCode> | ||
<ram:LineOne>Pappelallee 15</ram:LineOne> | ||
<ram:LineTwo>Hof 3</ram:LineTwo> | ||
<ram:CityName>Leipzig</ram:CityName> | ||
<ram:CountryID>DE</ram:CountryID> | ||
</ram:PostalTradeAddress> | ||
<ram:URIUniversalCommunication> | ||
<ram:URIID schemeID="9958">04 0 11 000 - 12345 12345 - 35</ram:URIID> | ||
</ram:URIUniversalCommunication> | ||
</ram:BuyerTradeParty> | ||
<ram:SellerTaxRepresentativeTradeParty> | ||
<ram:Name>Global Supplies Financial Services</ram:Name> | ||
<ram:PostalTradeAddress> | ||
<ram:PostcodeCode>12345</ram:PostcodeCode> | ||
<ram:LineOne>Friedrichstraße 165</ram:LineOne> | ||
<ram:CityName>Berlin</ram:CityName> | ||
<ram:CountryID>DE</ram:CountryID> | ||
</ram:PostalTradeAddress> | ||
<ram:SpecifiedTaxRegistration> | ||
<ram:ID schemeID="VA">DE1334567</ram:ID> | ||
</ram:SpecifiedTaxRegistration> | ||
</ram:SellerTaxRepresentativeTradeParty> | ||
</ram:ApplicableHeaderTradeAgreement> | ||
<ram:ApplicableHeaderTradeDelivery> | ||
<ram:ShipToTradeParty> | ||
<ram:ID>75969815</ram:ID> | ||
<ram:Name>Metallbau Leipzig GmbH & Co. KG</ram:Name> | ||
<ram:PostalTradeAddress> | ||
<ram:PostcodeCode>12347</ram:PostcodeCode> | ||
<ram:LineOne>Eichenpromenade 37</ram:LineOne> | ||
<ram:LineTwo>Tor 1</ram:LineTwo> | ||
<ram:CityName>Metallstadt</ram:CityName> | ||
<ram:CountryID>DE</ram:CountryID> | ||
</ram:PostalTradeAddress> | ||
<ram:URIUniversalCommunication> | ||
<ram:URIID schemeID="0060">999999999</ram:URIID> | ||
</ram:URIUniversalCommunication> | ||
</ram:ShipToTradeParty> | ||
</ram:ApplicableHeaderTradeDelivery> | ||
<ram:ApplicableHeaderTradeSettlement> | ||
<ram:TaxCurrencyCode>EUR</ram:TaxCurrencyCode> | ||
<ram:InvoiceCurrencyCode>GBP</ram:InvoiceCurrencyCode> | ||
<ram:PayeeTradeParty> | ||
<ram:GlobalID schemeID="0060">432156789</ram:GlobalID> | ||
<ram:Name>Global Supplies Financial Services</ram:Name> | ||
<ram:PostalTradeAddress> | ||
<ram:PostcodeCode>12345</ram:PostcodeCode> | ||
<ram:LineOne>Friedrichstraße 165</ram:LineOne> | ||
<ram:CityName>Berlin</ram:CityName> | ||
<ram:CountryID>DE</ram:CountryID> | ||
</ram:PostalTradeAddress> | ||
</ram:PayeeTradeParty> | ||
<ram:TaxApplicableTradeCurrencyExchange> | ||
<ram:SourceCurrencyCode>GBP</ram:SourceCurrencyCode> | ||
<ram:TargetCurrencyCode>EUR</ram:TargetCurrencyCode> | ||
<ram:ConversionRate>1.12244</ram:ConversionRate> | ||
<ram:ConversionRateDateTime> | ||
<udt:DateTimeString format="102">20181031</udt:DateTimeString> | ||
</ram:ConversionRateDateTime> | ||
</ram:TaxApplicableTradeCurrencyExchange> | ||
<ram:SpecifiedTradeSettlementPaymentMeans> | ||
<ram:TypeCode>58</ram:TypeCode> | ||
<ram:PayeePartyCreditorFinancialAccount> | ||
<ram:IBANID>DE12 1234 4321 9876 00</ram:IBANID> | ||
<ram:AccountName>Global Supplies Financial Services</ram:AccountName> | ||
</ram:PayeePartyCreditorFinancialAccount> | ||
</ram:SpecifiedTradeSettlementPaymentMeans> | ||
<ram:ApplicableTradeTax> | ||
<ram:CalculatedAmount>163.16</ram:CalculatedAmount> | ||
<ram:TypeCode>VAT</ram:TypeCode> | ||
<ram:BasisAmount>858.75</ram:BasisAmount> | ||
<ram:LineTotalBasisAmount>850</ram:LineTotalBasisAmount> | ||
<ram:AllowanceChargeBasisAmount>8.75</ram:AllowanceChargeBasisAmount> | ||
<ram:CategoryCode>S</ram:CategoryCode> | ||
<ram:RateApplicablePercent>19</ram:RateApplicablePercent> | ||
</ram:ApplicableTradeTax> | ||
<ram:BillingSpecifiedPeriod> | ||
<ram:StartDateTime> | ||
<udt:DateTimeString format="102">20181001</udt:DateTimeString> | ||
</ram:StartDateTime> | ||
<ram:EndDateTime> | ||
<udt:DateTimeString format="102">20181031</udt:DateTimeString> | ||
</ram:EndDateTime> | ||
</ram:BillingSpecifiedPeriod> | ||
<ram:SpecifiedTradeAllowanceCharge> | ||
<ram:ChargeIndicator> | ||
<udt:Indicator>true</udt:Indicator> | ||
</ram:ChargeIndicator> | ||
<ram:ActualAmount>30</ram:ActualAmount> | ||
<ram:ReasonCode>ABK</ram:ReasonCode> | ||
<ram:Reason>Einwegverpackung</ram:Reason> | ||
<ram:CategoryTradeTax> | ||
<ram:TypeCode>VAT</ram:TypeCode> | ||
<ram:CategoryCode>S</ram:CategoryCode> | ||
<ram:RateApplicablePercent>19</ram:RateApplicablePercent> | ||
</ram:CategoryTradeTax> | ||
</ram:SpecifiedTradeAllowanceCharge> | ||
<ram:SpecifiedTradeAllowanceCharge> | ||
<ram:ChargeIndicator> | ||
<udt:Indicator>false</udt:Indicator> | ||
</ram:ChargeIndicator> | ||
<ram:CalculationPercent>2.5</ram:CalculationPercent> | ||
<ram:BasisAmount>850</ram:BasisAmount> | ||
<ram:ActualAmount>21.25</ram:ActualAmount> | ||
<ram:ReasonCode>ABK</ram:ReasonCode> | ||
<ram:Reason>Stammkundenrabatt</ram:Reason> | ||
<ram:CategoryTradeTax> | ||
<ram:TypeCode>VAT</ram:TypeCode> | ||
<ram:CategoryCode>S</ram:CategoryCode> | ||
<ram:RateApplicablePercent>19</ram:RateApplicablePercent> | ||
</ram:CategoryTradeTax> | ||
</ram:SpecifiedTradeAllowanceCharge> | ||
<ram:SpecifiedTradePaymentTerms> | ||
<ram:Description>Zahlbar ohne Abschlag bis </ram:Description> | ||
<ram:DueDateDateTime> | ||
<udt:DateTimeString format="102">20181120</udt:DateTimeString> | ||
</ram:DueDateDateTime> | ||
</ram:SpecifiedTradePaymentTerms> | ||
<ram:SpecifiedTradePaymentTerms> | ||
<ram:Description>Zahlbar mit 2% Skonto bis</ram:Description> | ||
<ram:DueDateDateTime> | ||
<udt:DateTimeString format="102">20181114</udt:DateTimeString> | ||
</ram:DueDateDateTime> | ||
</ram:SpecifiedTradePaymentTerms> | ||
<ram:SpecifiedTradeSettlementHeaderMonetarySummation> | ||
<ram:LineTotalAmount>850</ram:LineTotalAmount> | ||
<ram:ChargeTotalAmount>30</ram:ChargeTotalAmount> | ||
<ram:AllowanceTotalAmount>21.25</ram:AllowanceTotalAmount> | ||
<ram:TaxBasisTotalAmount>858.75</ram:TaxBasisTotalAmount> | ||
<ram:TaxTotalAmount currencyID="GBP">163.16</ram:TaxTotalAmount> | ||
<ram:TaxTotalAmount currencyID="EUR">183.14</ram:TaxTotalAmount> | ||
<ram:GrandTotalAmount>1021.91</ram:GrandTotalAmount> | ||
<ram:TotalPrepaidAmount>500</ram:TotalPrepaidAmount> | ||
<ram:DuePayableAmount>521.91</ram:DuePayableAmount> | ||
</ram:SpecifiedTradeSettlementHeaderMonetarySummation> | ||
</ram:ApplicableHeaderTradeSettlement> | ||
</rsm:SupplyChainTradeTransaction> | ||
</rsm:CrossIndustryInvoice> |