[latex3-commits] [git/LaTeX3-latex3-pdfresources] testxmp: test factur-x-bill (9640330)

Ulrike Fischer fischer at troubleshooting-tex.de
Mon Sep 19 16:50:26 CEST 2022


Repository : https://github.com/latex3/pdfresources
On branch  : testxmp
Link       : https://github.com/latex3/pdfresources/commit/96403301248f41eac59804713d1dbd3f0e9b45dc

>---------------------------------------------------------------

commit 96403301248f41eac59804713d1dbd3f0e9b45dc
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Mon Sep 19 16:50:26 2022 +0200

    test factur-x-bill


>---------------------------------------------------------------

96403301248f41eac59804713d1dbd3f0e9b45dc
 experiments/factur-x-bills/factur-x-test.pdf | Bin 0 -> 41397 bytes
 experiments/factur-x-bills/factur-x-test.tex |  71 ++++++++++++++
 experiments/factur-x-bills/rechnung.xml      | 132 +++++++++++++++++++++++++++
 3 files changed, 203 insertions(+)

diff --git a/experiments/factur-x-bills/factur-x-test.pdf b/experiments/factur-x-bills/factur-x-test.pdf
new file mode 100644
index 0000000..89cf150
Binary files /dev/null and b/experiments/factur-x-bills/factur-x-test.pdf differ
diff --git a/experiments/factur-x-bills/factur-x-test.tex b/experiments/factur-x-bills/factur-x-test.tex
new file mode 100644
index 0000000..009c042
--- /dev/null
+++ b/experiments/factur-x-bills/factur-x-test.tex
@@ -0,0 +1,71 @@
+% !Mode:: "TeX:UTF-8:Main"
+\DocumentMetadata{uncompress,pdfstandard=a-3b}
+\documentclass{article}
+
+\ExplSyntaxOn
+\pdfmeta_xmp_xmlns_new:nn{fx}{urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0\c_hash_str}
+
+\cs_generate_variant:Nn \__pdfmeta_xmp_schema_new:nnn {nne}
+\__pdfmeta_xmp_schema_new:nne
+  {Factur-X~PDFA~Extension~Schema}
+  {fx}
+  {urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0\c_hash_str}
+
+\__pdfmeta_xmp_property_new:nnnnn
+  {fx}
+  {DocumentFileName}
+  {Text}
+  {external}
+  {name~of~the~embedded~XML~invoice~file}
+\__pdfmeta_xmp_property_new:nnnnn
+  {fx}
+  {DocumentType}
+  {Text}
+  {external}
+  {INVOICE}
+\__pdfmeta_xmp_property_new:nnnnn
+  {fx}
+  {Version}
+  {Text}
+  {external}
+  {The~actual~version~of~the~factur-x~schema}
+\__pdfmeta_xmp_property_new:nnnnn
+  {fx}
+  {ConformanceLevel}
+  {Text}
+  {external}
+  {The~conformance~level~of~the~factur-x~data}
+  
+
+\cs_generate_variant:Nn\pdfmeta_xmp_add:n{e}
+\pdfmeta_xmp_add:e
+ {
+  % fix INVOICE
+  <fx:DocumentType>INVOICE</fx:DocumentType>\iow_newline:
+  % fix factur-x.xml
+  <fx:DocumentFileName>factur-x.xml</fx:DocumentFileName>\iow_newline:
+  % fix schema version
+  <fx:Version>1.0</fx:Version>\iow_newline:
+  % variable (zulässige Werte MINIMUM, BASIC WL, BASIC, EN 16931, EXTENDED, XRECHNUNG)
+  <fx:ConformanceLevel>BASIC</fx:ConformanceLevel>\iow_newline:
+  % 
+ }
+
+\group_begin:
+\pdfdict_put:nnn {l_pdffile/Filespec} {AFRelationship}{/Alternative}
+\pdfdict_put:nnn {l_pdffile/Filespec} {Desc}{(Factur-X/ZUGFeRD-Rechnung)}
+\pdffile_embed_file:nnn {rechnung.xml}{factur-x.xml}{zugferd/rechnung} 
+\group_end:
+
+\pdfmanagement_add:nnx
+  {Catalog/Names}
+  {EmbeddedFiles}
+  {\pdf_object_ref:n{zugferd/rechnung}}
+% steht in der docu ist aber pdf 2.0 ....  
+\pdfmanagement_add:nnx{Catalog}{AF}{\pdf_object_ref:n{zugferd/rechnung}}  
+\ExplSyntaxOff
+
+\begin{document}
+eine Rechnung
+
+\end{document}
\ No newline at end of file
diff --git a/experiments/factur-x-bills/rechnung.xml b/experiments/factur-x-bills/rechnung.xml
new file mode 100644
index 0000000..b7b4b7c
--- /dev/null
+++ b/experiments/factur-x-bills/rechnung.xml
@@ -0,0 +1,132 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<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#compliant#urn:factur-x.eu:1p0:basic</ram:ID>
+    </ram:GuidelineSpecifiedDocumentContextParameter>
+  </rsm:ExchangedDocumentContext>
+  <rsm:ExchangedDocument>
+    <ram:ID>471102</ram:ID>
+    <ram:TypeCode>380</ram:TypeCode>
+    <ram:IssueDateTime>
+      <udt:DateTimeString format="102">20200305</udt:DateTimeString>
+    </ram:IssueDateTime>
+    <ram:IncludedNote>
+      <ram:Content>Rechnung gemäß Bestellung vom 01.03.2020.</ram:Content>
+    </ram:IncludedNote>
+    <ram:IncludedNote>
+      <ram:Content>Lieferant GmbH				
+Lieferantenstraße 20				
+80333 München				
+Deutschland				
+Geschäftsführer: Hans Muster
+Handelsregisternummer: H A 123
+      </ram:Content>
+    </ram:IncludedNote>
+    <ram:IncludedNote>
+      <ram:Content>Unsere GLN: 4000001123452
+Ihre GLN: 4000001987658
+Ihre Kundennummer: GE2020211
+
+
+Zahlbar innerhalb 30 Tagen netto bis 04.04.2020, 3% Skonto innerhalb 10 Tagen bis 15.03.2020.
+      </ram:Content>
+    </ram:IncludedNote>
+  </rsm:ExchangedDocument>
+  <rsm:SupplyChainTradeTransaction>
+    <ram:IncludedSupplyChainTradeLineItem>
+      <ram:AssociatedDocumentLineDocument>
+        <ram:LineID>1</ram:LineID>
+      </ram:AssociatedDocumentLineDocument>
+      <ram:SpecifiedTradeProduct>
+        <ram:GlobalID schemeID="0160">4012345001235</ram:GlobalID>
+
+        <ram:Name>GTIN: 4012345001235
+Unsere Art.-Nr.: TB100A4
+Trennblätter A4
+        </ram:Name>
+      </ram:SpecifiedTradeProduct>
+	        <ram:SpecifiedLineTradeAgreement>
+        <ram:NetPriceProductTradePrice>
+          <ram:ChargeAmount>9.90</ram:ChargeAmount>
+        </ram:NetPriceProductTradePrice>
+      </ram:SpecifiedLineTradeAgreement>
+      <ram:SpecifiedLineTradeDelivery>
+        <ram:BilledQuantity unitCode="H87">20.0000</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>198.00</ram:LineTotalAmount>
+        </ram:SpecifiedTradeSettlementLineMonetarySummation>
+      </ram:SpecifiedLineTradeSettlement>
+    </ram:IncludedSupplyChainTradeLineItem>
+    <ram:ApplicableHeaderTradeAgreement>
+      <ram:SellerTradeParty>
+        <ram:Name>Lieferant GmbH</ram:Name>
+        <ram:PostalTradeAddress>
+          <ram:PostcodeCode>80333</ram:PostcodeCode>
+          <ram:LineOne>Lieferantenstraße 20</ram:LineOne>
+          <ram:CityName>München</ram:CityName>
+          <ram:CountryID>DE</ram:CountryID>
+        </ram:PostalTradeAddress>
+        <ram:SpecifiedTaxRegistration>
+          <ram:ID schemeID="FC">201/113/40209</ram:ID>
+        </ram:SpecifiedTaxRegistration>
+        <ram:SpecifiedTaxRegistration>
+          <ram:ID schemeID="VA">DE123456789</ram:ID>
+        </ram:SpecifiedTaxRegistration>
+      </ram:SellerTradeParty>
+      <ram:BuyerTradeParty>
+        <ram:Name>Kunden AG Mitte</ram:Name>
+        <ram:PostalTradeAddress>
+          <ram:PostcodeCode>69876</ram:PostcodeCode>
+          <ram:LineOne>Hans Muster</ram:LineOne>
+          <ram:LineTwo>Kundenstraße 15</ram:LineTwo>
+          <ram:CityName>Frankfurt</ram:CityName>
+          <ram:CountryID>DE</ram:CountryID>
+        </ram:PostalTradeAddress>
+      </ram:BuyerTradeParty>
+    </ram:ApplicableHeaderTradeAgreement>
+    <ram:ApplicableHeaderTradeDelivery>
+      <ram:ActualDeliverySupplyChainEvent>
+        <ram:OccurrenceDateTime>
+          <udt:DateTimeString format="102">20200305</udt:DateTimeString>
+        </ram:OccurrenceDateTime>
+      </ram:ActualDeliverySupplyChainEvent>
+    </ram:ApplicableHeaderTradeDelivery>
+    <ram:ApplicableHeaderTradeSettlement>
+      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
+      <ram:ApplicableTradeTax>
+        <ram:CalculatedAmount>37.62</ram:CalculatedAmount>
+        <ram:TypeCode>VAT</ram:TypeCode>
+        <ram:BasisAmount>198.00</ram:BasisAmount>
+		<ram:CategoryCode>S</ram:CategoryCode>
+        <ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
+      </ram:ApplicableTradeTax>
+	  <ram:SpecifiedTradePaymentTerms>
+        <ram:DueDateDateTime>
+          <udt:DateTimeString format="102">20200404</udt:DateTimeString>
+        </ram:DueDateDateTime>
+      </ram:SpecifiedTradePaymentTerms>
+      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>
+        <ram:LineTotalAmount>198.00</ram:LineTotalAmount>
+        <ram:ChargeTotalAmount>0.00</ram:ChargeTotalAmount>
+        <ram:AllowanceTotalAmount>0.00</ram:AllowanceTotalAmount>
+        <ram:TaxBasisTotalAmount>198.00</ram:TaxBasisTotalAmount>
+		<ram:TaxTotalAmount currencyID="EUR">37.62</ram:TaxTotalAmount>
+        <ram:GrandTotalAmount>235.62</ram:GrandTotalAmount>
+		<ram:DuePayableAmount>235.62</ram:DuePayableAmount>
+      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
+    </ram:ApplicableHeaderTradeSettlement>
+  </rsm:SupplyChainTradeTransaction>
+</rsm:CrossIndustryInvoice>





More information about the latex3-commits mailing list.