├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── build.xml ├── conf ├── fonts │ ├── OFL.txt │ ├── SourceSerifPro-Light.ttf │ ├── SourceSerifPro-LightItalic.ttf │ ├── SourceSerifPro-SemiBold.ttf │ └── SourceSerifPro-SemiBoldItalic.ttf ├── fop-with-ua1-a1.xconf └── fop.xconf ├── development.build.properties.example ├── doc ├── about.md ├── architecture.md ├── development.md ├── guide-for-visual-testing.md └── usage.md ├── img └── visualization-concept.png └── src ├── README.md ├── test └── instances │ ├── direct-debit-bt-90-payee_creditnote.xml │ ├── direct-debit-bt-90-payee_ubl.xml │ ├── direct-debit-bt-90-seller_creditnote.xml │ ├── direct-debit-bt-90-seller_ubl.xml │ ├── embedded-documents-bt-125_ubl.xml │ ├── embedded-documents-with-newline-and-whitespace_ubl.xml │ ├── itemAttributes_ubl.xml │ ├── maxRechnung_creditnote.xml │ ├── maxRechnung_ubl.xml │ ├── wrong-date-with-text-uncefact.xml │ └── wrong-date-with-zeros-uncefact.xml ├── xsd └── xrechnung-semantic-model.xsd └── xsl ├── FileSaver-v2.0.5.js ├── cii-xr.xsl ├── common-xr.xsl ├── functions.xsl ├── l10n ├── de.xml └── en.xml ├── ubl-creditnote-xr.xsl ├── ubl-invoice-xr.xsl ├── xr-content.xsl ├── xr-pdf.xsl ├── xr-pdf └── lib │ ├── konstanten.xsl │ └── structure │ ├── content-templates.xsl │ ├── layout-master-set.xsl │ └── page-sequence.xsl ├── xrechnung-html.xsl ├── xrechnung-viewer.css └── xrechnung-viewer.js /.gitignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /build 3 | /lib 4 | /reports 5 | development.build.properties 6 | .vscode 7 | *.xpr 8 | .ant-targets-build.xml 9 | /xslt 10 | *.zipost 11 | /.project 12 | /.settings/ 13 | .DS_Store -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). 6 | 7 | ## UNRELEASED 8 | 9 | This release is compatible with XRechnung ?.?.? 10 | 11 | ## v2025-03-21 12 | 13 | This release is compatible with XRechnung 3.0.x 14 | 15 | ### Changed 16 | 17 | * German label for BT-56 "Contact point" to "Kontaktstelle" 18 | * FO engine parameter for PDF transformation (thanks to GitHub user @yegorich) 19 | 20 | ### Fixed 21 | 22 | * Wrong BT-23 identifier (thanks to GitHub user @samcandis) 23 | * Broken English translation for BT-23 (thanks to GitHub user @samcandis) 24 | * Incorrect id uebersichtZuschlaege in html template 25 | * Display of BT-78 tooltip in `xrechnung-html.xsl` (thanks to GitHub user @chefarbeiter) 26 | * Display of BT-65 in `xrechnung-html.xsl` (thanks to GitHub user @chefarbeiter) 27 | * Several attributes in localization files `l10n/de.xml` and `l10n/en.xml` 28 | * RDF tags in pdf transformation (thanks to GitHub user @jstaerk) 29 | 30 | ## v2024-06-20 31 | 32 | This release is compatible with XRechnung 3.0.x 33 | 34 | ### Fixed 35 | 36 | * Incorrect German translation for BT-10 (thanks to GitHub user @futurescenario9) 37 | * BT-31: scheme identifier 'VAT' removed from templates 38 | * condition removed from BT-29 in cii2xr conversion, which prevented display of multiple BT-29 from different bindings 39 | * Display of specification identifier in PDF 40 | 41 | ## v2023-11-15 42 | 43 | This release is compatible with XRechnung 3.0.x 44 | 45 | ### Changed 46 | 47 | * Display of BT-158 in HTML 48 | * BG-3 "PRECEDING INVOICE REFERENCE" was added to test files `maxRechnung_ubl.xml` and `maxRechnung_creditnote.xml` 49 | * BT-11 "Project reference" with Document Type Code `50` was added to test file `maxRechnung_creditnote.xml` 50 | 51 | ## v2023-09-22 52 | 53 | This release is compatible with XRechnung 3.0.x 54 | 55 | ### Fixed 56 | 57 | * Cardinalities of BT-23 "Business process type", BT-34 "Seller electronic address", and BT-49 "Buyer electronic address" in `src/xsd/xrechnung-semantic-model.xsd` 58 | 59 | ## v2023-07-31 60 | 61 | This release is compatible with XRechnung 3.0.x 62 | 63 | ### Changed 64 | 65 | * Test files in accordance with new Schematron rules (see [XRechnung Schematron 2.0.0](https://github.com/itplr-kosit/xrechnung-schematron/releases/tag/release-2.0.0)) 66 | * Removed references to "Verzugszinsen" from `xrechnung-semantic-model.xsd` 67 | 68 | ### Fixed 69 | 70 | * Bug on selection of BT-61 path in `cii-xr.xsl` 71 | 72 | ## v2023-05-12 73 | 74 | This release is compatible with XRechnung 2.3.x 75 | 76 | ### Added 77 | 78 | * Notification if JavaScript is disabled 79 | 80 | ### Changed 81 | 82 | * BT-160 marked as value, not label 83 | * Removed id for Third Party Payment Total from translation files and html 84 | 85 | ## Fixed 86 | 87 | * Display of elements with unrestricted number of fraction digits (BT-146, BT-147, BT-148) in PDF (thanks to GitHub user @JannickWeisshaupt). 88 | * Display of BT-29 and BT-60 in UBL to prevent display of BT-90 as BT-29 or BT-60. 89 | * Superfluous display of BT-120 and BT-121 labels for VAT category codes that prohibit BT-120 and BT-121. 90 | * Missing output of BT-49 (Buyer electronic address) in HTML. 91 | * Misplaced output of BT-30 (Seller legal registration identifier) and BT-31 (Seller VAT identifier) values in Buyer section in HTML. 92 | * Bug on dates with years less than 1000 (thanks to GitHub user @JannickWeisshaupt). 93 | * Display of multiple BT-29 and BT-158. 94 | 95 | ## v2023-01-31 96 | 97 | This release is compatible with XRechnung 2.3.x 98 | 99 | ### Added 100 | 101 | * Visualization of third party payment 102 | 103 | ### Changed 104 | 105 | * Normalization of newlines in embedded documents 106 | * Percentage sign format in PDF and HTML now identical 107 | 108 | ### Fixed 109 | 110 | * Missing condition to BT-110 and BT-111 in ubl-creditnote-xr.xsl 111 | * Selection of identifier for pdf attachments 112 | * Missing percentage sign `%` output in PDF and PDF Tabular 113 | 114 | ## v2022-11-15 115 | 116 | This release is compatible with XRechnung 2.2.0 117 | 118 | ### Added 119 | 120 | * BG-26 INVOICE LINE PERIOD elements to `maxRechnung_ubl.xml` and `maxRechnung_creditNote.xml` test instances 121 | 122 | ### Changed 123 | 124 | * Unified country code labels 125 | * Unified translation of BG-1 INVOICE NOTE in PDF and HTML 126 | 127 | ### Fixed 128 | 129 | * Missing display of BG-14 INVOICING PERIOD 130 | * Missing display of BT-54 "Buyer country subdivision" in PDF 131 | * Removed unnecessary xslt messages 132 | * Display of BT-128 scheme identifier label in PDF normal 133 | * Incorrect elements in UBL test files removed 134 | * bug that prevented output of BT-82 in UBL 135 | 136 | 137 | ### Changed 138 | 139 | * Percentage sign format in PDF and HTML now identical 140 | 141 | ### Fixed 142 | 143 | * Missing percentage sign `%` output in PDF and PDF Tabular 144 | 145 | ## v2022-07-31 146 | 147 | This release is compatible with XRechnung 2.2.0 148 | 149 | ### Added 150 | 151 | * Added multiple BG-27 and BG-28 to `maxRechnung_ubl.xml` and `maxRechnung_creditNote.xml` test instances 152 | 153 | ### Fixed 154 | 155 | * Bug that prevented display of multiple embedded documents in PDF 156 | 157 | 158 | ## v2022-07-15 159 | 160 | This release is compatible with XRechnung 2.2.0 161 | 162 | ### Added 163 | 164 | * BT-128 "Invoice line object identifier" and "Invoice line object identifier/Scheme identifier" to `maxRechnung_ubl.xml` and `maxRechnung_creditNote.xml` test instances 165 | * Tests for BT-90 Scheme ID (see [Guide for visual testing Direct Debit](./doc/guide-for-visual-testing.md)) 166 | 167 | ### Fixed 168 | 169 | * Missing display of BT-107 "Sum of allowances on document level" 170 | * Superfluous display of BT-32 scheme identifier 171 | 172 | ## v2022-05-31 173 | 174 | ### Added 175 | 176 | * Several more test documents 177 | * Guide for visual testing 178 | 179 | ### Changed 180 | 181 | * Added FileSaver.js for better cross-browser attachment download functionality 182 | * Created ubl-common-xr.xsl for common named templates as a single point of change 183 | * Handling of calendar date display is now more robust 184 | 185 | ### Fixed 186 | 187 | * Missing display of BG-32 (thanks to GitHub user @JannickWeisshaupt) 188 | * BT-47 bug in UBL CreditNote 189 | * Logic and display of BT-110 and BT-111 in CII 190 | * Display of percentage sign for VAT percentage rate 191 | * Missing tooltips in HTML 192 | 193 | ## v2022-01-31 194 | 195 | ### Changed 196 | 197 | * Tests for all Testsuite instances (except for DiGA example codes) are included 198 | 199 | ### Fixed 200 | 201 | * HTML errors except "stray start tag script" as VNU The Nu Html Checker (v.Nu) reports 202 | * Translation key for BT-126 (Invoice Line Identifier) 203 | * Address Labels in HTML for: 204 | * Buyer Address (BT-50, BT-51, BT-163), 205 | * Seller Address (BT-35, BT-36, BT-162), 206 | * Tax representative Address (BT-64, BT-65, BT-164), and 207 | * Deliver To Address (BT-75, BT-76, BT-165) 208 | * Display of BT-72 (Actual Delivery Date) 209 | 210 | 211 | ## v2021-11-15 212 | 213 | ### Added 214 | 215 | * Added documentation about [architecture](doc/architecture.md) and [usage](doc/usage.md) 216 | * Added support for localization -- English and German output is supported. This was done for HTML and PDF output. 217 | * Added BT-26 to maxRechnung.xml 218 | 219 | ### Changed 220 | 221 | * Enhanced accessibility of HTML output 222 | * PDF output is now accessible (PDF/UA level), fonts are embedded into PDF 223 | * Saxon version is configurable with properties (thanks to GitHub user @knoxyz) 224 | * Default saxon version is set to HE-10.6 225 | * Rewrote README.md for more details and added links to documentation 226 | 227 | ### Fixed 228 | 229 | * Fixed format-date of BT-26 in xrechnung-html.xsl (thanks to GitHub user @knoxyz) 230 | * BT-30-Scheme-ID visualized 231 | 232 | ## v2021-07-31 233 | 234 | ### Added 235 | 236 | * Configuration option for customizable line numbering of invoice lines 237 | * Configuration option for tabular display of line items for PDF generation 238 | 239 | ### Fixed 240 | 241 | * BT-23 get displayed 242 | * BT-7 and BT-8 is now displayed in invoice data section 243 | * Correct translation of BT-86 in cii 244 | 245 | ## v2020-12-31 246 | 247 | ### Changed 248 | 249 | * cii-xr.xsl tolerates dates with hyphens 250 | 251 | ### Fixed 252 | 253 | * Fixed german date format of bt-9 in pdf visualization 254 | * Fixed visualization of BG-20, BG-21, BG-27, BG-28 255 | * Fixed visualization of BT-11 in UBL-CreditNote 256 | 257 | ## v2020-07-30 258 | 259 | ### Added 260 | 261 | * Sub Invoice Line with recursion in UBL-Invoice 262 | * PDF visualization 263 | * Ids to html divs 264 | 265 | ### Changed 266 | 267 | * Compatible with XRechnung 2.0.0 268 | * Xsl scripts are not generated automatically from xrechnung-model anymore 269 | * Add scheme-ids and scheme-version-ids to div ids 270 | * Show multiple payment terms and payment due days from CII 271 | 272 | ### Fixed 273 | 274 | * Issue double generation of BT-47, BT-86 275 | * Multiple line allowances and line charges (BG-27, BG-28) 276 | * Id of BG-27 fixed in xr-mapping.xsl and xrechnung-html.xsl 277 | * Fixed german decimal seperator and missing zero in decimal smaller than 1 278 | * Fixed visualization of BT-74 and BT-74 279 | * Fixed BT-39 in HTML 280 | 281 | ## v2019-06-24 282 | 283 | ### Added 284 | 285 | * License 286 | 287 | ### Changed 288 | 289 | * compatible with XRechnung 1.2.1 290 | * Add CEN license statement 291 | 292 | ### Fixed 293 | 294 | * BUG in the creation of `` 295 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | ----- 203 | Der Standard XRechnung steht unter dem Lizenzabkommen 204 | (englischsprachige Originalquelle: https://ec.europa.eu/cefdigital/wiki/display/CEFDIGITAL/Obtaining+a+copy+of+the+European+standard+on+eInvoicing) 205 | der Europäischen Kommission (EK) und dem Europäischen Komitee für Normung (CEN): 206 | 207 | Der europäische Standard zur elektronischen Rechnungsstellung (EN 16931) wird vom CEN durch Beauftragung der EK entwickelt und veröffentlicht. 208 | Die Urheberrechte am Standard liegen beim CEN, Kopien des Standards werden über die nationalen Standardisierungsorganisationen vertrieben. 209 | Das Abkommen zwischen EK und CEN besagt, dass im Rahmen der geistigen Eigentumsrechte (IPR) 210 | am Standard das semantische Datenmodell der Kernelemente einer elektronischen Rechnung (EN 16931-1:2017) 211 | und den zwei mandatorischen Syntaxen (CEN/TS 16931-2:2017) unentgeltlich über 212 | das Deutsche Institut für Normung (DIN) in ihrer Rolle als nationale 213 | Standardisierungsorganisation zu beziehen sind. 214 | Der Standard XRechnung ist eine Implementierung dieses Datenmodelles und der zwei mandatorischen Syntaxen und die Vervielfältigung ist 215 | durch die Genehmigung von CEN und DIN als Urheberrechtsträger gestattet. 216 | CEN und DIN übernehmen keine Garantie für den Inhalt und die Implementierung dieser Derivate 217 | und im Zweifelsfalle ist immer auf die offiziell autorisierten Dokumente des semantischen Datenmodells 218 | und der zwei mandatorischen Syntaxen zurückzugreifen, welche durch das DIN zur Verfügung gestellt werden. 219 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # XRechnung Visualization Transformators 2 | 3 | XSL transformators for web rendering of German CIUS XRechnung or EN16931-1:2017. 4 | 5 | The source documents have to be in either UBL Invoice/CreditNote XML and CII XML and have to be conforming to German CIUS XRechnung or EN16931-1:2017. 6 | 7 | The transformations have to happen in two steps: 8 | 9 | 1. Either UBL Invoice/CreditNote XML or CII XML have to be transformed to an intermediate XML which has to be valid to a proprietary simple [XML Schema](src/xsd/xrechnung-semantic-model.xsd) 10 | 2. Then you can use either 11 | - [xrechnung-html.xsl](src/xsl/xrechnung-html.xsl) to render an HTML document or 12 | - [xr-pdf.xsl](src/xsl/xr-pdf.xsl) to render an PDF document 13 | 14 | See our [architecture documentation](doc/architecture.md) (in German) for a general overview. 15 | Here you can find more details on [configuration and usage options](doc/usage.md) 16 | 17 | You can find an example use of these transformations in the [ant build script](build.xml). It also includes some technical tests. 18 | 19 | ## Notes 20 | 21 | The visualization component is part of the technical components that have been published as a bundle together with the XRechnung standard since version 1.2.0. 22 | 23 | These components are not software solutions but merely represent optional building blocks in 3rd party software. You are free to use them. The standard XRechnung DOES NOT oblige the use of these components. However, we always publish the components in accordance with the resp. version of XRechnung specification. As such, our components themselves are implementations which claim to be conformant to the standard. 24 | 25 | Please also note that only the structured, machine-readable format (XML) is considered the original invoice that must be archived in accordance with legal requirements. 26 | Visualizations generated from an XRechnung are NOT valid instances of XRechnung. They aim to improve readability by the human eye and are NOT meant to serve as formats for long-term archiving. 27 | 28 | 29 | This GitHub repository is only a mirror of our [GitLab project repository](https://projekte.kosit.org/xrechnung/xrechnung-visualization). 30 | 31 | For questions please contact [KoSIT](https://xeinkauf.de/kontakt/#support). 32 | -------------------------------------------------------------------------------- /conf/fonts/OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /conf/fonts/SourceSerifPro-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itplr-kosit/xrechnung-visualization/755128ed0b76883c05d994dc8498a16f5971a649/conf/fonts/SourceSerifPro-Light.ttf -------------------------------------------------------------------------------- /conf/fonts/SourceSerifPro-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itplr-kosit/xrechnung-visualization/755128ed0b76883c05d994dc8498a16f5971a649/conf/fonts/SourceSerifPro-LightItalic.ttf -------------------------------------------------------------------------------- /conf/fonts/SourceSerifPro-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itplr-kosit/xrechnung-visualization/755128ed0b76883c05d994dc8498a16f5971a649/conf/fonts/SourceSerifPro-SemiBold.ttf -------------------------------------------------------------------------------- /conf/fonts/SourceSerifPro-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itplr-kosit/xrechnung-visualization/755128ed0b76883c05d994dc8498a16f5971a649/conf/fonts/SourceSerifPro-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /conf/fop-with-ua1-a1.xconf: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | 5 | 6 | PDF/UA-1 7 | PDF/A-1a 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /conf/fop.xconf: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /development.build.properties.example: -------------------------------------------------------------------------------- 1 | ### 2 | # XRECHNUNG VISUALISATION properties 3 | # 4 | # Customize these properties to develop with local dependencies. 5 | ## 6 | 7 | ## 8 | # This value has to be same as ant basedir because basedir is not set in this context 9 | # 10 | # Please set this value first and with an absolute path. 11 | ## 12 | #work.dir=/mnt/c/data/git-repos/xrechnung-visualisation 13 | 14 | ## 15 | # Designates the specification version for which this visualisation is valid 16 | ## 17 | #xrechnung.version.full=2.2.0 18 | 19 | ## 20 | # Set PDF profile 21 | ## 22 | #fop.config=${work.dir}/conf/fop.xconf 23 | 24 | ## 25 | # 26 | # Use local Validator Configuration XRechnung Repository 27 | # 28 | ## 29 | 30 | #validator.repository.dir=${FULL PATH TO}/validator-configuration-xrechnung/build 31 | 32 | ## 33 | # Set this property in order to activate targets for local development 34 | # Be aware the presence of this property determines some of the behavior independent of the value 35 | ## 36 | #develop.local.xr.testsuite=true 37 | ### 38 | # Get latest XRechnung Testsuite distribution from your local git project 39 | # Example is relative to this project directory in local file system 40 | ## 41 | #xr.testsuite.download.url.prefix=file://${work.dir}/../xrechnung-testsuite/dist 42 | 43 | #xr.testsuite.version=2022-01-31-SNAPSHOT 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /doc/about.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | Die zur Umsetzung des beschriebenen Konzepts benötigten Komponenten beinhalten 4 | verschiedene Bestandteile. 5 | 6 | Elektronische Rechnungen, die visualisiert werden sollen, sind XRechnungskonforme XML-Instanzen in den vorgegebenen Syntaxen UBL und CII. Diese können mittels von der KoSIT 7 | bereitgestellten Transformationsskripten in das syntaxneutrale Format überführt werden. 8 | 9 | Eine beispielhafte Visualisierung des Kompetenzzentrums für das Kassen- und 10 | Rechnungswesen des Bundes (KKR) ist mittels eines weiteren Transformationsskriptes in 11 | (X)HTML-Format möglich und kann anhand von CSS-Datei(en) zur Umsetzung von Layout 12 | und Labeln gestaltet werden. Diese Visualisierung dient der Veranschaulichung und kann 13 | anwendungsspezifisch angepasst werden. 14 | 15 | Die Komponenten zur Visualisierung bestehen aus den folgenden Teilen: 16 | 17 | | # | Komponente - Beschreibung | Verantwortung | 18 | | :--- | :---: | :---: | 19 | | 1. | Transformationsskripte (XSLTs) zur Überführung von Rechnungen im UBL-Format und CII-Format (konform zu XRechnung) in das syntaxneutrale Format | KoSIT | 20 | | 2. | XML Schema-Definition (XSD) zur Validierung der erzeugten Rechnungen im syntaxneutralen Format | KoSIT | 21 | | 3. | Transformationsskript (XSLT) zur Überführung von syntaxneutralen Rechnungen in das (X)HTML-Format | KKR | 22 | | 4. | CSS-Datei(en) zur Umsetzung von Layout und Labeln | KKR | 23 | Abbildung 2: Bestandteile und Verantwortlichkeiten 24 | 25 | Als Betreiberin des Standards XRechnung stellt die KoSIT die *Bestandteile 1 und 2* bereit, das KKR liefert die *Bestandteile 3 und 4* zur beispielhaften Visualisierung. -------------------------------------------------------------------------------- /doc/architecture.md: -------------------------------------------------------------------------------- 1 | # Architecture 2 | 3 | Der Standard XRechnung basiert auf der Europäischen Norm EN16931. Diese Norm besteht 4 | aus einem semantischen Datenmodell und sogenannten Syntax-Bindings zu den 5 | vorgegebenen Syntaxen. 6 | 7 | Das semantische Datenmodell spezifiziert in nicht-technischer Form mögliche Bestandteile 8 | (Rechnungsnummer, Rechnungsdatum, Rechnungsbetrag, Käufer etc.) elektronischer 9 | Rechnungen in Form von Business Terms (BT), Business Groups (BG) und Business Rules 10 | (BR). Mit den Syntax-Bindings wird spezifiziert, wie diese Bestandteile in technischer Form 11 | abgebildet werden müssen. Grundlage dieser Spezifikation sind die beiden durch die Norm 12 | vorgegebenen Syntaxen UBL und CII und die diesen Syntaxen zugrundeliegenden XML 13 | Schema-Dateien. 14 | 15 | Im Rahmen der Umsetzung der elektronischen Rechnungsbe- und -verarbeitung wurde in 16 | unterschiedlichen Zusammenhängen die Anforderung formuliert, die durch die Norm 17 | spezifizierte technische Abbildung einer konkreten Rechnung (= XML-Instanz) in 18 | strukturierter Form für menschliche Leser\*innen optimiert lesbar anzuzeigen. Bestandteile 19 | dieser Anzeige (Visualisierung) sind zum einen die konkreten Inhalte der elektronischen 20 | Rechnung und deren Bezug zu den BTs und BGs der Norm. Zum anderen muss das 21 | Konzept der Visualisierung anwendungsspezifische Anforderungen hinsichtlich Position, 22 | Reihenfolge und Bezeichnung der Bestandteile einer Rechnung unterstützen. 23 | 24 | *Abbildung 1* zeigt einen konzeptionellen Ansatz zur Erzeugung der Visualisierung von 25 | XRechnungen unter Berücksichtigung der genannten Anforderungen. 26 | 27 | ![Grundkonzept der Visualisierung von XRechnung](../img/visualization-concept.png) 28 |
Abbildung 1: Grundkonzept der Visualisierung von XRechnung
29 | 30 | *Schritt 1* beinhaltet die Rechnungen im Format der durch die Norm geforderten technischen 31 | Syntaxen (XML-Instanzen in UBL bzw. CII). 32 | 33 | *Schritt 2* zeigt die mittels einer bereitgestellten Transformation (XSL-Datei aus den 34 | gegebenen XML-Instanzen) in eine „syntaxneutrale“ Abbildung der Rechnung, die um die 35 | Information zu den in der Rechnung genutzten BTs und BGs angereichert ist. 36 | 37 | Diese Abbildung ist die Basis für eine zweite Transformation der Rechnung in eine domänen- bzw. anwendungsspezifische Visualisierung im HTML-Format (*Schritt 3*). Die letztendliche 38 | Visualisierung dieser HTML-Instanzen erfolgt mittels CSS-Dateien, in denen individuelle 39 | Bezeichner, Positionen und Reihenfolgen der BTs/BGs und der zugehörigen 40 | Rechnungsinhalte spezifiziert sind. Transformation (XSL-Datei) und zugehörige CSS-Dateien 41 | werden durch die jeweiligen Anwendungsbereiche bereitgestellt. -------------------------------------------------------------------------------- /doc/development.md: -------------------------------------------------------------------------------- 1 | # Development of XRechnung Visualization 2 | 3 | 4 | ## Project Structure 5 | 6 | * `src` contains the source files. 7 | * `src/test` contains example instances of invoice files. 8 | * `src/xsd` contains the schema of the intermediate xml. 9 | * `src/xsl` contains the transformation files. 10 | 11 | ## Dependencies Overview 12 | 13 | ### Compile Time 14 | 15 | That is for creating visualizations. 16 | 17 | * Apache FOP 18 | * Saxon HE 19 | * XRechnung-Testsuite 20 | 21 | ### Testing 22 | 23 | * validator-configuration-xrechnung 24 | * VNU HTML Validator 25 | 26 | ## The build environment 27 | 28 | This repository contains an ANT `build.xml` for development and test. 29 | 30 | We recommend `Apache Ant` version 1.10.x or newer (but should work with > 1.8.x). 31 | 32 | The main `ant` targets for development are: 33 | 34 | * `clean` deletes all generated folders i.e. foremost the `build` directory. 35 | * `transform-to-visualization` generates all visualizations from xrechnung-testsuite and test instances in `src/test` 36 | * `test` validates source UBL or CII XML against XRechnung, transforms to XR Sem Model and schema validates results and transforms and test HTML and PDF visualization 37 | * and `dist` (creating the distribution artefact) 38 | 39 | However, because of the complex dependencies, you may only expect `transform-to-visualization` target to work without any customizations. 40 | 41 | ## Test dependencies on the fly 42 | 43 | If you build own local custom versions of dependencies such as XRechnung Testsuite or Validator Configuration XRechnung, you can customize the ant build at runtime. 44 | 45 | ### Test with local Validator Configuration XRechnung 46 | 47 | If you want to test with a local validator configuration xrechnung installation set the ant property `validator.repository.dir` to the directory (full path) like e.g. `validator.repository.dir=/mnt/c/data/git-repos/validator-configuration-xrechnung/build` (Linux). 48 | To execute the `test` target, for example, call 49 | 50 | ```shell 51 | ant -Dvalidator.repository.dir=/home/renzo/projects/validator-configuration-xrechnung/build test 52 | ``` 53 | 54 | For Windows users: 55 | 56 | ```shell 57 | ant "-Dvalidator.repository.dir=/c:/dev/git/validator-configuration-xrechnung/build" test 58 | ``` 59 | 60 | ### Development properties file 61 | 62 | In order to configure more complex adoption to the local development needs, you have to load a set of different properties from a file. 63 | 64 | We provide the `development.build.properties.example` file for the most common properties to be set different than default. It contains some documentation. 65 | 66 | You have to copy the file to e.g. `development.build.properties` and you have to explicitly provide the property file location at CLI for your development (otherwise tests will always fail or not be executed at all). 67 | 68 | 69 | ## Distribution 70 | 71 | The `ant` target `dist` creates the distribution zip Archive for releases. 72 | 73 | ## Release 74 | 75 | ### Checklist 76 | 77 | * Are all issues scheduled for the release solved? 78 | * Is everything merged to master branch? 79 | * Make sure that CHANGELOG.md is up to date 80 | * Make sure all external contributors are mentioned 81 | 82 | 83 | ### Prepare 84 | 85 | * Make sure you committed and pushed everything 86 | * Create the distribution 87 | 88 | * Use the `clean` target to build and test all from scratch 89 | 90 | ``` 91 | ant clean dist 92 | ``` 93 | 94 | * Tag the last commit according to the following naming rule: `v${xr-visu.version.full}` e.g. 95 | `git tag v2025-03-21 && git push origin v2025-03-21` 96 | 97 | ### Publish 98 | 99 | * Draft a new release at https://github.com/itplr-kosit/xrechnung-visualization/releases/new 100 | * Choose the git tag you just created 101 | * Add release title of the following scheme: `XRechnung Visualization ${xr-visu.version.full} compatible with XRechnung ${xrechnung.version}` 102 | * Copy & paste the high quality changelog entries for this release from CHANGELOG.md. 103 | * Upload distribution zip and tick mark this release as a `pre-release`. 104 | * If **all** released components are checked to be okay, then uncheck pre-release. 105 | 106 | ### Post-Release 107 | 108 | * Change the version of this component in `build.xml` to the next release and commit 109 | * bump version 110 | * update CHANGELOG.md 111 | 112 | You are done :smile: 113 | -------------------------------------------------------------------------------- /doc/guide-for-visual-testing.md: -------------------------------------------------------------------------------- 1 | # Guide for Visual Testing 2 | 3 | ## Embedded Documents 4 | For testing embedded documents' features, use 5 | * embedded-documents-bt-125_ubl.xml 6 | * embedded-documents-with-newline-and-whitespace_ubl.xml 7 | * 01.15 8 | 9 | Expectation: 10 | * HTML: should work across all browsers 11 | * PDF: default configuration should work: 12 | * with Adobe Professional 2017 13 | * with PDF-XChange Viewer 2.5 14 | * but not in browsers at all 15 | 16 | ## Scheme Identifier for various BTs 17 | * maxRechnung_ubl.xml 18 | * maxRechnung_creditnote.xml 19 | 20 | ## "Project reference" (BT-11) in UBL Creditnote 21 | * maxRechnung_creditnote.xml 22 | 23 | ## Direct Debit (BG-19) 24 | 25 | * direct-debit-bt-90-seller_ubl.xml (BT-29 and BT-60 with @schemeID) 26 | * direct-debit-bt-90-payee_ubl.xml (BT-29 and BT-60 without @schemeID) 27 | * direct-debit-bt-90-seller_creditnote.xml (BT-29 and BT-60 with @schemeID) 28 | * direct-debit-bt-90-payee_creditnote.xml (BT-29 and BT-60 without @schemeID) 29 | 30 | ## Item Attributes (BG-32) 31 | * itemAttributes_ubl.xml 32 | 33 | ## Dates 34 | * wrong-date-with-text-uncefact.xml 35 | * wrong-date-with-zeros-uncefact.xml 36 | 37 | expectation: 38 | * fields should contain "no date defined" or similar 39 | * all others should show YYYY-MM-DD without timezone 40 | -------------------------------------------------------------------------------- /doc/usage.md: -------------------------------------------------------------------------------- 1 | # Usage 2 | 3 | There are various configuration options for the XSLT transformations. 4 | 5 | ## PDF Transformation 6 | 7 | ### Choice of PDF Profile 8 | 9 | There are various profiles for PDF generation. The default uses none with enabled accessibility. 10 | In order to use profile PDF/UA-1 and PDF/A-1, you can use another FOP configuration during build time, e.g. 11 | ```bash 12 | ant -Dfop.config=conf/fop-with-ua1-a1.xconf transform-xr-to-pdf 13 | ``` 14 | 15 | Note: PDF/A-1 does not allow embedded files. Use the default profile for display of embedded documents. 16 | 17 | ### Choice of FO engine 18 | 19 | The FO engine used can be specified. Engine specific extensions will then be enabled. 20 | 21 | ```xml 22 | 23 | ``` 24 | 25 | Supported values are: 26 | * axf - Antenna House XSL Formatter 27 | * fop - Apache FOP 28 | 29 | ### Layout options 30 | 31 | **Configuration of the general invoice layout ** 32 | 33 | ```xml 34 | normal 35 | ``` 36 | Supported values are: 37 | * normal - Similar to HTML layout incl. box layout of invoice lines 38 | * tabular - Tabular layout of invoice lines 39 | 40 | **Configuration of table column width** 41 | 42 | ```xml 43 | 2 7 2 2 2 2 1.3 2 44 | ``` 45 | 46 | Change column proportions according to your tabular layout. 47 | 48 | **Configuration of the invoice line numbering scheme** 49 | 50 | ```xml 51 | normal 52 | ``` 53 | 54 | Supported values are: 55 | * normal - use numbers as in original invoice 56 | * 1.1 - use multilevel arabic numbering 57 | * 1.i - use mixture of arabic and roman numbering 58 | * 00001 - use aligned arabic numbering 59 | * *other* - any picture string supported by [xsl:number](https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/number) instruction can be used 60 | 61 | ### Choice of Language for HTML and PDF 62 | 63 | Default language is German (de), an English (en) translation is also provided. 64 | 65 | ```xml 66 | 67 | ``` 68 | 69 | Translation files are located in the [l10n subdirectory](../src/xsl/l10n/) and can be customized according to specific local needs. 70 | 71 | Translation files are formatted according to Java Properties in XML (see https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Properties.html for details). 72 | Additional languages can be included by adding XML Properties files to the [l10n directory](../src/xsl/l10n/). By default, files have to be named according to ISO 639-1 two letter language codes (e.g. `fr.xml` for French). -------------------------------------------------------------------------------- /img/visualization-concept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itplr-kosit/xrechnung-visualization/755128ed0b76883c05d994dc8498a16f5971a649/img/visualization-concept.png -------------------------------------------------------------------------------- /src/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | ## Path through pdf generation 4 | 5 | ``` 6 | xr-pdf.xsl 7 | template match "xr-invoice" 8 | call-template generiere-layout-master-set 9 | (defines A4 fo page header footer margins) 10 | call-template generiere-page-sequence 11 | page-sequence.xsl 12 | template generiere-page-sequence 13 | fo header 14 | fo footer 15 | fo content (flow) 16 | call-template uebersicht 17 | xr-content.xsl 18 | template uebersicht 19 | call-template page 20 | content-template.xsl 21 | template page 22 | call-template uebersicht_Content as param 23 | xr-content.xsl 24 | template uebersicht_Content 25 | call-template uebersichtKaeufer 26 | xr-content.xsl 27 | template uebersichtKaeufer 28 | call-template box 29 | content-template.xsl 30 | template box 31 | call-template list as param 32 | content-template.xsl 33 | template list 34 | apply-template list-entry as param for every term 35 | content-template.xsl 36 | template list-entry 37 | (same for uebersichtVerkaeufer, uebersichtRechnungsInfo, uebersichtRechnungsuebersicht, uebersichtUmsatzsteuer, uebersichtNachlass, uebersichtZuschlaege, uebersichtZahlungInfo, uebersichtBemerkungen) 38 | call-template details 39 | call-template zusaetze 40 | call-template anlagen 41 | call-template laufzettel 42 | ``` 43 | 44 | ## discussion 45 | 46 | ### goal 47 | 48 | * possible configuration of layout (e.g. compact as parameter) 49 | * seperation of nomenclatur content and data entries 50 | * data.xml, data-field.xml and data-value.xml 51 | * only push or pull data 52 | 53 | ### critism 54 | 55 | * pull of sementic data (e.g. uebersichtKaeufer) 56 | * beginning from call-template uebersichtKaefer the process is not structured by the layout but by the data. 57 | * xr-mapping.xsl maps informations already exists in xr 58 | 59 | ### notes 60 | 61 | * layout of group 62 | -------------------------------------------------------------------------------- /src/test/instances/direct-debit-bt-90-payee_creditnote.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 8 | urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 9 | 1234567890 10 | 2018-10-15 11 | 381 12 | Bemerkung zu der Rechnung gibt es nicht, da dies eine Testrechnung 13 | ist. 14 | EUR 15 | 99000000-01514-29 16 | 17 | 2018-10-16 18 | 2018-10-23 19 | 20 | 21 | 2345678901 22 | Auftragsreferenz 23 | 24 | 25 | Vertragsreferenz 26 | 27 | 28 | 29 | Vergabe-und Losreferenz 30 | 31 | 35 | 36 | 37 | rechnungsausgang@test.com 38 | 39 | 40 | 292345678 41 | 42 | 43 | EntServDE 44 | 45 | 46 | Straße Rechnungssteller 1 47 | Erweiterte Anschrift 48 | Rechnungssteller 49 | Ort Rechnungssteller 50 | 12345 51 | Bundesland Rechnungssteller 52 | 53 | DK 54 | 55 | 56 | 57 | ATU13585627 58 | 59 | VAT 60 | 61 | 62 | 63 | 456 64 | 65 | AAA 66 | 67 | 68 | 69 | EntServ Deutschland GmbH 70 | 123456789 71 | Weitere rechtliche 72 | Informationen 73 | 74 | 75 | EntServ Deutschland 76 | 0123 456789 77 | kontakt@Rechnungssteller.de 78 | 79 | 80 | 81 | 82 | 83 | rechnungseingang@test.de 84 | 85 | DPMA-678 86 | 87 | 88 | Abweichender Handelsname Rechnungsempfänger 89 | 90 | 91 | Straße Rechnungsempfänger 1 92 | Erweitere Adresse 93 | Rechnungempfänger 94 | Ort Rechnungsempfänger 95 | 67890 96 | Bundesland 97 | Rechnungsempfänger 98 | 99 | CN 100 | 101 | 102 | 103 | ATU13585627 104 | 105 | VAT 106 | 107 | 108 | 109 | Deutsches Patent - und 110 | Markenamt 111 | 90000000-03083-12 112 | 113 | 114 | Kontakt Rechnungsempfänger 115 | 0987 654321 116 | tina@tester.de 117 | 118 | 119 | 120 | 121 | 122 | 123 | 601234567 124 | 125 | 126 | 127 | DE64500105173922382999 128 | 129 | 130 | Abweichender Zahlungsempfänger 131 | 132 | 133 | AZE-123 134 | 135 | 136 | 137 | 2018-10-22 138 | 139 | AL 140 | 141 | Anderer Leistungsempfänger Straße 1 142 | Anderer Leistungsempfänger erweiterte 143 | Adresse 144 | Anderer Leistungsempfänger Ort 145 | 45678 146 | Anderer Leistungempfänger 147 | Bundesland 148 | 149 | BS 150 | 151 | 152 | 153 | 154 | 155 | Anderer Leistungsempfänger 156 | 157 | 158 | 159 | 160 | 161 | 59 162 | 163 | 12345 164 | 165 | DE22500105175263185267 166 | 167 | 168 | 169 | 170 | Zahlungsbedingungen gibt es nicht, da dies eine Testrechnung 171 | ist. 172 | 173 | 174 | false 175 | Grund für den Nachlass auf 176 | Dokumentenebene 177 | 50.00 178 | 1000.00 179 | 2000.00 180 | 181 | S 182 | 19 183 | 184 | VAT 185 | 186 | 187 | 188 | 189 | true 190 | Grund für den Zuschlag auf 191 | Dokumentenenbene 192 | 10.00 193 | 400.00 194 | 4000.00 195 | 196 | Z 197 | 0 198 | 199 | VAT 200 | 201 | 202 | 203 | 204 | false 205 | Grund für Nachlass 2 206 | 10.00 207 | 1500.00 208 | 15000.00 209 | 210 | E 211 | 0 212 | 213 | VAT 214 | 215 | 216 | 217 | 218 | 510.00 219 | 220 | 400.00 221 | 0 222 | 223 | Z 224 | 0 225 | 226 | VAT 227 | 228 | 229 | 230 | 231 | 10000.00 232 | 700.00 233 | 234 | S 235 | 7 236 | 237 | VAT 238 | 239 | 240 | 241 | 242 | -1000.00 243 | -190.00 244 | 245 | S 246 | 19 247 | 248 | VAT 249 | 250 | 251 | 252 | 253 | -1500.00 254 | 0 255 | 256 | E 257 | 0 258 | Grund für die Befreiung 259 | 260 | VAT 261 | 262 | 263 | 264 | 265 | 266 | 10000.00 267 | 7900.00 268 | 8410.00 269 | 2500.00 271 | 400.00 272 | 500.00 273 | 210.00 275 | 8120.00 276 | 277 | 278 | 123 279 | 10.00 280 | 10000.00 281 | BRE 282 | 283 | RPB 284 | 285 | 286 | 7362789 287 | 130 288 | 289 | 290 | false 291 | Grund Nachlass 292 | 10.00 293 | 10.00 294 | 100.00 295 | 296 | 297 | false 298 | Grund Nachlass 2 299 | 50.00 300 | 100.00 301 | 200.00 302 | 303 | 304 | true 305 | Grund Zuschlag 306 | 50.00 307 | 100.00 308 | 200.00 309 | 310 | 311 | true 312 | Grund Zuschlag 2 313 | 10.00 314 | 10.00 315 | 100.00 316 | 317 | 318 | Beschreibung Artikel 319 | Bezeichung Artikel 320 | 321 | BB 322 | 323 | 324 | 456 325 | 326 | 327 | 1234567890128 328 | 329 | 330 | 12344321 331 | 332 | 333 | S 334 | 7 335 | 336 | VAT 337 | 338 | 339 | 340 | Name der Eigenschaft 341 | Wert der Eigenschaft 342 | 343 | 344 | Name der Artikeleigenschaft 345 | Wert der Artikeleigenschaft 346 | 347 | 348 | 349 | 1000 350 | 351 | 352 | 353 | -------------------------------------------------------------------------------- /src/test/instances/direct-debit-bt-90-payee_ubl.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 9 | urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 10 | 1234567890 11 | 2018-10-15 12 | 2018-10-29 13 | 380 14 | Bemerkung zu der Rechnung gibt es nicht, da dies eine Testrechnung 15 | ist. 16 | EUR 17 | 99000000-01514-29 18 | 19 | 2018-10-16 20 | 2018-10-23 21 | 22 | 23 | 2345678901 24 | Auftragsreferenz 25 | 26 | 27 | Vergabe-und Losreferenz 28 | 29 | 30 | Vertragsreferenz 31 | 32 | 38 | 39 | Projektreferenz 40 | 41 | 42 | 43 | rechnungsausgang@test.com 44 | 45 | 46 | 987654321 47 | 48 | 49 | EntServDE 50 | 51 | 52 | Straße Rechnungssteller 1 53 | Erweiterte Anschrift 54 | Rechnungssteller 55 | Ort Rechnungssteller 56 | 12345 57 | Bundesland Rechnungssteller 58 | 59 | DK 60 | 61 | 62 | 63 | ATU13585627 64 | 65 | VAT 66 | 67 | 68 | 69 | 456 70 | 71 | AAA 72 | 73 | 74 | 75 | EntServ Deutschland GmbH 76 | 123456789 77 | Weitere rechtliche 78 | Informationen 79 | 80 | 81 | EntServ Deutschland 82 | 0123 456789 83 | kontakt@Rechnungssteller.de 84 | 85 | 86 | 87 | 88 | 89 | rechnungseingang@test.de 90 | 91 | DPMA-678 92 | 93 | 94 | Abweichender Handelsname Rechnungsempfänger 95 | 96 | 97 | Straße Rechnungsempfänger 1 98 | Erweitere Adresse 99 | Rechnungempfänger 100 | Ort Rechnungsempfänger 101 | 67890 102 | Bundesland 103 | Rechnungsempfänger 104 | 105 | CN 106 | 107 | 108 | 109 | ATU13585627 110 | 111 | VAT 112 | 113 | 114 | 115 | Deutsches Patent - und 116 | Markenamt 117 | 90000000-03083-12 118 | 119 | 120 | Kontakt Rechnungsempfänger 121 | 0987 654321 122 | tina@tester.de 123 | 124 | 125 | 126 | 127 | 128 | 129 | 601234567 130 | 131 | 132 | 133 | DE64500105173922382999 134 | 135 | 136 | Abweichender Zahlungsempfänger 137 | 138 | 139 | AZE-123 140 | 141 | 142 | 143 | 2018-10-22 144 | 145 | AL 146 | 147 | Anderer Leistungsempfänger Straße 1 148 | Anderer Leistungsempfänger erweiterte 149 | Adresse 150 | Anderer Leistungsempfänger Ort 151 | 45678 152 | Anderer Leistungempfänger 153 | Bundesland 154 | 155 | BS 156 | 157 | 158 | 159 | 160 | 161 | Anderer Leistungsempfänger 162 | 163 | 164 | 165 | 166 | 167 | 59 168 | 169 | 12345 170 | 171 | DE22500105175263185267 172 | 173 | 174 | 175 | 176 | Zahlungsbedingungen gibt es nicht, da dies eine Testrechnung 177 | ist. 178 | 179 | 180 | false 181 | Grund für den Nachlass auf 182 | Dokumentenebene 183 | 40.00 184 | 1000.00 185 | 2500.00 186 | 187 | S 188 | 19 189 | 190 | VAT 191 | 192 | 193 | 194 | 195 | true 196 | Grund für den Zuschlag auf 197 | Dokumentenenbene 198 | 30.00 199 | 400.00 200 | 1333.33 201 | 202 | Z 203 | 0 204 | 205 | VAT 206 | 207 | 208 | 209 | 210 | false 211 | Grund für Nachlass 2 212 | 80.00 213 | 1500.00 214 | 1875.00 215 | 216 | E 217 | 0 218 | 219 | VAT 220 | 221 | 222 | 223 | 224 | 510.00 225 | 226 | 400.00 227 | 0 228 | 229 | Z 230 | 0 231 | 232 | VAT 233 | 234 | 235 | 236 | 237 | 10000.00 238 | 700.00 239 | 240 | S 241 | 7 242 | 243 | VAT 244 | 245 | 246 | 247 | 248 | -1000.00 249 | -190.00 250 | 251 | S 252 | 19 253 | 254 | VAT 255 | 256 | 257 | 258 | 259 | -1500.00 260 | 0 261 | 262 | E 263 | 0 264 | Grund für die Befreiung 265 | 266 | VAT 267 | 268 | 269 | 270 | 271 | 272 | 10000.00 273 | 7900.00 274 | 8410.00 275 | 2500.00 276 | 400.00 277 | 500.00 278 | 210.00 279 | 8120.00 280 | 281 | 282 | 123 283 | 10.00 284 | 10000.00 285 | BRE 286 | 287 | RPB 288 | 289 | 290 | 7362789 291 | 130 292 | 293 | 294 | false 295 | Grund Nachlass 296 | 10.00 297 | 10.00 298 | 100.00 299 | 300 | 301 | false 302 | Grund Nachlass 2 303 | 50.00 304 | 100.00 305 | 200.00 306 | 307 | 308 | true 309 | Grund Zuschlag 310 | 50.00 311 | 100.00 312 | 200.00 313 | 314 | 315 | true 316 | Grund Zuschlag 2 317 | 10.00 318 | 10.00 319 | 100.00 320 | 321 | 322 | Beschreibung Artikel 323 | Bezeichung Artikel 324 | 325 | BB 326 | 327 | 328 | 456 329 | 330 | 331 | 1234567890128 332 | 333 | 334 | 12344321 336 | 337 | 338 | S 339 | 7 340 | 341 | VAT 342 | 343 | 344 | 345 | Name der Eigenschaft 346 | Wert der Eigenschaft 347 | 348 | 349 | Name der Artikeleigenschaft 350 | Wert der Artikeleigenschaft 351 | 352 | 353 | 354 | 1000 355 | 356 | 357 | 358 | -------------------------------------------------------------------------------- /src/test/instances/direct-debit-bt-90-seller_creditnote.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 8 | urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 9 | 1234567890 10 | 2018-10-15 11 | 381 12 | Bemerkung zu der Rechnung gibt es nicht, da dies eine Testrechnung 13 | ist. 14 | EUR 15 | 99000000-01514-29 16 | 17 | 2018-10-16 18 | 2018-10-23 19 | 20 | 21 | 2345678901 22 | Auftragsreferenz 23 | 24 | 25 | Vertragsreferenz 26 | 27 | 28 | 29 | Vergabe-und Losreferenz 30 | 31 | 35 | 36 | 37 | rechnungsausgang@test.com 38 | 39 | 40 | 291234567 41 | 42 | 43 | 44 | DE64500105173922382999 45 | 46 | 47 | EntServDE 48 | 49 | 50 | Straße Rechnungssteller 1 51 | Erweiterte Anschrift 52 | Rechnungssteller 53 | Ort Rechnungssteller 54 | 12345 55 | Bundesland Rechnungssteller 56 | 57 | DK 58 | 59 | 60 | 61 | ATU13585627 62 | 63 | VAT 64 | 65 | 66 | 67 | 456 68 | 69 | AAA 70 | 71 | 72 | 73 | EntServ Deutschland GmbH 74 | 123456789 75 | Weitere rechtliche 76 | Informationen 77 | 78 | 79 | EntServ Deutschland 80 | 0123 456789 81 | kontakt@Rechnungssteller.de 82 | 83 | 84 | 85 | 86 | 87 | rechnungseingang@test.de 88 | 89 | DPMA-678 90 | 91 | 92 | Abweichender Handelsname Rechnungsempfänger 93 | 94 | 95 | Straße Rechnungsempfänger 1 96 | Erweitere Adresse 97 | Rechnungempfänger 98 | Ort Rechnungsempfänger 99 | 67890 100 | Bundesland 101 | Rechnungsempfänger 102 | 103 | CN 104 | 105 | 106 | 107 | ATU13585627 108 | 109 | VAT 110 | 111 | 112 | 113 | Deutsches Patent - und 114 | Markenamt 115 | 90000000-03083-12 116 | 117 | 118 | Kontakt Rechnungsempfänger 119 | 0987 654321 120 | tina@tester.de 121 | 122 | 123 | 124 | 125 | 126 | 127 | AZE 128 | 129 | 130 | Abweichender Zahlungsempfänger 131 | 132 | 133 | AZE-123 134 | 135 | 136 | 137 | 2018-10-22 138 | 139 | AL 140 | 141 | Anderer Leistungsempfänger Straße 1 142 | Anderer Leistungsempfänger erweiterte 143 | Adresse 144 | Anderer Leistungsempfänger Ort 145 | 45678 146 | Anderer Leistungempfänger 147 | Bundesland 148 | 149 | BS 150 | 151 | 152 | 153 | 154 | 155 | Anderer Leistungsempfänger 156 | 157 | 158 | 159 | 160 | 161 | 59 162 | 163 | 12345 164 | 165 | DE22500105175263185267 166 | 167 | 168 | 169 | 170 | Zahlungsbedingungen gibt es nicht, da dies eine Testrechnung 171 | ist. 172 | 173 | 174 | false 175 | Grund für den Nachlass auf 176 | Dokumentenebene 177 | 50.00 178 | 1000.00 179 | 2000.00 180 | 181 | S 182 | 19 183 | 184 | VAT 185 | 186 | 187 | 188 | 189 | true 190 | Grund für den Zuschlag auf 191 | Dokumentenenbene 192 | 10.00 193 | 400.00 194 | 4000.00 195 | 196 | Z 197 | 0 198 | 199 | VAT 200 | 201 | 202 | 203 | 204 | false 205 | Grund für Nachlass 2 206 | 10.00 207 | 1500.00 208 | 15000.00 209 | 210 | E 211 | 0 212 | 213 | VAT 214 | 215 | 216 | 217 | 218 | 510.00 219 | 220 | 400.00 221 | 0 222 | 223 | Z 224 | 0 225 | 226 | VAT 227 | 228 | 229 | 230 | 231 | 10000.00 232 | 700.00 233 | 234 | S 235 | 7 236 | 237 | VAT 238 | 239 | 240 | 241 | 242 | -1000.00 243 | -190.00 244 | 245 | S 246 | 19 247 | 248 | VAT 249 | 250 | 251 | 252 | 253 | -1500.00 254 | 0 255 | 256 | E 257 | 0 258 | Grund für die Befreiung 259 | 260 | VAT 261 | 262 | 263 | 264 | 265 | 266 | 10000.00 267 | 7900.00 268 | 8410.00 269 | 2500.00 271 | 400.00 272 | 500.00 273 | 210.00 275 | 8120.00 276 | 277 | 278 | 123 279 | 10.00 280 | 10000.00 281 | BRE 282 | 283 | RPB 284 | 285 | 286 | 7362789 287 | 130 288 | 289 | 290 | false 291 | Grund Nachlass 292 | 10.00 293 | 10.00 294 | 100.00 295 | 296 | 297 | false 298 | Grund Nachlass 2 299 | 50.00 300 | 100.00 301 | 200.00 302 | 303 | 304 | true 305 | Grund Zuschlag 306 | 50.00 307 | 100.00 308 | 200.00 309 | 310 | 311 | true 312 | Grund Zuschlag 2 313 | 10.00 314 | 10.00 315 | 100.00 316 | 317 | 318 | Beschreibung Artikel 319 | Bezeichung Artikel 320 | 321 | BB 322 | 323 | 324 | 456 325 | 326 | 327 | 1234567890128 328 | 329 | 330 | 12344321 331 | 332 | 333 | S 334 | 7 335 | 336 | VAT 337 | 338 | 339 | 340 | Name der Eigenschaft 341 | Wert der Eigenschaft 342 | 343 | 344 | Name der Artikeleigenschaft 345 | Wert der Artikeleigenschaft 346 | 347 | 348 | 349 | 1000 350 | 351 | 352 | 353 | -------------------------------------------------------------------------------- /src/test/instances/direct-debit-bt-90-seller_ubl.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 9 | urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 10 | 1234567890 11 | 2018-10-15 12 | 2018-10-29 13 | 380 14 | Bemerkung zu der Rechnung gibt es nicht, da dies eine Testrechnung 15 | ist. 16 | EUR 17 | 99000000-01514-29 18 | 19 | 2018-10-16 20 | 2018-10-23 21 | 22 | 23 | 2345678901 24 | Auftragsreferenz 25 | 26 | 27 | Vergabe-und Losreferenz 28 | 29 | 30 | Vertragsreferenz 31 | 32 | 38 | 39 | Projektreferenz 40 | 41 | 42 | 43 | rechnungsausgang@test.com 44 | 45 | 46 | 291234567 47 | 48 | 49 | 50 | DE64500105173922382999 51 | 52 | 53 | EntServDE 54 | 55 | 56 | Straße Rechnungssteller 1 57 | Erweiterte Anschrift 58 | Rechnungssteller 59 | Ort Rechnungssteller 60 | 12345 61 | Bundesland Rechnungssteller 62 | 63 | DK 64 | 65 | 66 | 67 | ATU13585627 68 | 69 | VAT 70 | 71 | 72 | 73 | 456 74 | 75 | AAA 76 | 77 | 78 | 79 | EntServ Deutschland GmbH 80 | 123456789 81 | Weitere rechtliche 82 | Informationen 83 | 84 | 85 | EntServ Deutschland 86 | 0123 456789 87 | kontakt@Rechnungssteller.de 88 | 89 | 90 | 91 | 92 | 93 | rechnungseingang@test.de 94 | 95 | DPMA-678 96 | 97 | 98 | Abweichender Handelsname Rechnungsempfänger 99 | 100 | 101 | Straße Rechnungsempfänger 1 102 | Erweitere Adresse 103 | Rechnungempfänger 104 | Ort Rechnungsempfänger 105 | 67890 106 | Bundesland 107 | Rechnungsempfänger 108 | 109 | CN 110 | 111 | 112 | 113 | ATU13585627 114 | 115 | VAT 116 | 117 | 118 | 119 | Deutsches Patent - und 120 | Markenamt 121 | 90000000-03083-12 122 | 123 | 124 | Kontakt Rechnungsempfänger 125 | 0987 654321 126 | tina@tester.de 127 | 128 | 129 | 130 | 131 | 132 | 133 | AZE 134 | 135 | 136 | Abweichender Zahlungsempfänger 137 | 138 | 139 | AZE-123 140 | 141 | 142 | 143 | 2018-10-22 144 | 145 | AL 146 | 147 | Anderer Leistungsempfänger Straße 1 148 | Anderer Leistungsempfänger erweiterte 149 | Adresse 150 | Anderer Leistungsempfänger Ort 151 | 45678 152 | Anderer Leistungempfänger 153 | Bundesland 154 | 155 | BS 156 | 157 | 158 | 159 | 160 | 161 | Anderer Leistungsempfänger 162 | 163 | 164 | 165 | 166 | 167 | 59 168 | 169 | 12345 170 | 171 | DE22500105175263185267 172 | 173 | 174 | 175 | 176 | Zahlungsbedingungen gibt es nicht, da dies eine Testrechnung 177 | ist. 178 | 179 | 180 | false 181 | Grund für den Nachlass auf 182 | Dokumentenebene 183 | 50.00 184 | 1000.00 185 | 2000.00 186 | 187 | S 188 | 19 189 | 190 | VAT 191 | 192 | 193 | 194 | 195 | true 196 | Grund für den Zuschlag auf 197 | Dokumentenenbene 198 | 10.00 199 | 400.00 200 | 4000.00 201 | 202 | Z 203 | 0 204 | 205 | VAT 206 | 207 | 208 | 209 | 210 | false 211 | Grund für Nachlass 2 212 | 10.00 213 | 1500.00 214 | 15000.00 215 | 216 | E 217 | 0 218 | 219 | VAT 220 | 221 | 222 | 223 | 224 | 510.00 225 | 226 | 400.00 227 | 0 228 | 229 | Z 230 | 0 231 | 232 | VAT 233 | 234 | 235 | 236 | 237 | 10000.00 238 | 700.00 239 | 240 | S 241 | 7 242 | 243 | VAT 244 | 245 | 246 | 247 | 248 | -1000.00 249 | -190.00 250 | 251 | S 252 | 19 253 | 254 | VAT 255 | 256 | 257 | 258 | 259 | -1500.00 260 | 0 261 | 262 | E 263 | 0 264 | Grund für die Befreiung 265 | 266 | VAT 267 | 268 | 269 | 270 | 271 | 272 | 10000.00 273 | 7900.00 274 | 8410.00 275 | 2500.00 276 | 400.00 277 | 500.00 278 | 210.00 279 | 8120.00 280 | 281 | 282 | 123 283 | 10.00 284 | 10000.00 285 | BRE 286 | 287 | RPB 288 | 289 | 290 | 7362789 291 | 130 292 | 293 | 294 | false 295 | Grund Nachlass 296 | 10.00 297 | 10.00 298 | 100.00 299 | 300 | 301 | false 302 | Grund Nachlass 2 303 | 50.00 304 | 100.00 305 | 200.00 306 | 307 | 308 | true 309 | Grund Zuschlag 310 | 50.00 311 | 100.00 312 | 200.00 313 | 314 | 315 | true 316 | Grund Zuschlag 2 317 | 10.00 318 | 10.00 319 | 100.00 320 | 321 | 322 | Beschreibung Artikel 323 | Bezeichung Artikel 324 | 325 | BB 326 | 327 | 328 | 456 329 | 330 | 331 | 1234567890128 332 | 333 | 334 | 12344321 336 | 337 | 338 | S 339 | 7 340 | 341 | VAT 342 | 343 | 344 | 345 | Name der Eigenschaft 346 | Wert der Eigenschaft 347 | 348 | 349 | Name der Artikeleigenschaft 350 | Wert der Artikeleigenschaft 351 | 352 | 353 | 354 | 1000 355 | 356 | 357 | 358 | -------------------------------------------------------------------------------- /src/test/instances/itemAttributes_ubl.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 6 | urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 7 | 123456XX 8 | 2016-04-04 9 | 380 10 | #ADU#Es gelten unsere Allgem. Geschäftsbedingungen, die Sie unter […] finden. 11 | EUR 12 | 04011000-12345-03 13 | 14 | 15 | seller@seller.com 16 | 17 | [Seller trading name] 18 | 19 | 20 | [Seller address line 1] 21 | [Seller city] 22 | 12345 23 | 24 | DE 25 | 26 | 27 | 28 | DE 123456789 29 | 30 | VAT 31 | 32 | 33 | 34 | [Seller name] 35 | [HRA-Eintrag] 36 | 123/456/7890, HRA-Eintrag in […] 37 | 38 | 39 | nicht vorhanden 40 | +49 1234-5678 41 | seller@email.de 42 | 43 | 44 | 45 | 46 | 47 | buyer@buyer.com 48 | 49 | [Buyer identifier] 50 | 51 | 52 | [Buyer address line 1] 53 | [Buyer city] 54 | 12345 55 | 56 | DE 57 | 58 | 59 | 60 | [Buyer name] 61 | 62 | 63 | 64 | 65 | 58 66 | 67 | 68 | DE75512108001245126199 69 | 70 | 71 | 72 | Zahlbar sofort ohne Abzug. 73 | 74 | 75 | 22.04 76 | 77 | 314.86 78 | 22.04 79 | 80 | S 81 | 7 82 | 83 | VAT 84 | 85 | 86 | 87 | 88 | 89 | 314.86 90 | 314.86 91 | 336.9 92 | 336.9 93 | 94 | 95 | Zeitschrift [...] 96 | Die letzte Lieferung im Rahmen des abgerechneten Abonnements erfolgt in 12/2016 Lieferung erfolgt / erfolgte direkt vom Verlag 97 | 1 98 | 288.79 99 | 100 | 2016-01-01 101 | 2016-12-31 102 | 103 | 104 | 6171175.1 105 | 106 | 107 | Zeitschrift Inland 108 | Zeitschrift [...] 109 | 110 | 246 111 | 112 | 113 | 0721-880X 114 | 115 | 116 | S 117 | 7 118 | 119 | VAT 120 | 121 | 122 | 123 | Property Name 124 | Property value 125 | 126 | 127 | 128 | 288.79 129 | 130 | 131 | 132 | Porto + Versandkosten 133 | 1 134 | 26.07 135 | 136 | Porto + Versandkosten 137 | 138 | S 139 | 7 140 | 141 | VAT 142 | 143 | 144 | 145 | 146 | 26.07 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /src/test/instances/maxRechnung_creditnote.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 8 | urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 9 | 1234567890 10 | 2018-10-15 11 | 381 12 | Bemerkung zu der Rechnung gibt es nicht, da dies eine Testrechnung 13 | ist. 14 | EUR 15 | 99000000-01514-29 16 | 17 | 2018-10-01 18 | 2018-10-23 19 | 20 | 21 | 2345678901 22 | Auftragsreferenz 23 | 24 | 25 | 26 | PRG1502168 27 | 2018-10-13 28 | 29 | 30 | 31 | Vertragsreferenz 32 | 33 | 34 | Dokument Referenz 35 | Beschreibung der angehängten JPG-Datei 36 | 37 | 38 | Kennung des Objekts 39 | ATS 40 | 41 | 42 | 43 | Projektreferenz 44 | 50 45 | 46 | 47 | Vergabe-und Losreferenz 48 | 49 | 50 | 51 | rechnungsausgang@test.com 52 | 53 | Kennung des Verkäufers 54 | 55 | 56 | EntServDE 57 | 58 | 59 | Straße Rechnungssteller 1 60 | Erweiterte Anschrift 61 | Rechnungssteller 62 | Ort Rechnungssteller 63 | 12345 64 | Bundesland Rechnungssteller 65 | 66 | DK 67 | 68 | 69 | 70 | ATU13585627 71 | 72 | VAT 73 | 74 | 75 | 76 | 456 77 | 78 | AAA 79 | 80 | 81 | 82 | EntServ Deutschland GmbH 83 | 123456789 84 | Weitere rechtliche 85 | Informationen 86 | 87 | 88 | EntServ Deutschland 89 | 0123 456789 90 | kontakt@Rechnungssteller.de 91 | 92 | 93 | 94 | 95 | 96 | rechnungseingang@test.de 97 | 98 | DPMA-678 99 | 100 | 101 | Abweichender Handelsname Rechnungsempfänger 102 | 103 | 104 | Straße Rechnungsempfänger 1 105 | Erweitere Adresse 106 | Rechnungempfänger 107 | Ort Rechnungsempfänger 108 | 67890 109 | Bundesland 110 | Rechnungsempfänger 111 | 112 | CN 113 | 114 | 115 | 116 | ATU13585627 117 | 118 | VAT 119 | 120 | 121 | 122 | Deutsches Patent - und 123 | Markenamt 124 | 90000000-03083-12 125 | 126 | 127 | Kontakt Rechnungsempfänger 128 | 0987 654321 129 | tina@tester.de 130 | 131 | 132 | 133 | 134 | 135 | AZE 136 | 137 | 138 | Abweichender Zahlungsempfänger 139 | 140 | 141 | AZE-123 142 | 143 | 144 | 145 | 2018-10-22 146 | 147 | AL 148 | 149 | Anderer Leistungsempfänger Straße 1 150 | Anderer Leistungsempfänger erweiterte 151 | Adresse 152 | Anderer Leistungsempfänger Ort 153 | 45678 154 | Anderer Leistungempfänger 155 | Bundesland 156 | 157 | BS 158 | 159 | 160 | 161 | 162 | 163 | Anderer Leistungsempfänger 164 | 165 | 166 | 167 | 168 | 30 169 | Verwendungszweck 170 | 171 | DE84 6004 0071 0561 5158 01 172 | EntServ Deutschland GmbH 173 | 174 | XXX0561515801 175 | 176 | 177 | 178 | 179 | Zahlungsbedingungen gibt es nicht, da dies eine Testrechnung 180 | ist. 181 | 182 | 183 | false 184 | Grund für den Nachlass auf 185 | Dokumentenebene 186 | 40.00 187 | 1000.00 188 | 2500.00 189 | 190 | S 191 | 19 192 | 193 | VAT 194 | 195 | 196 | 197 | 198 | true 199 | Grund für den Zuschlag auf 200 | Dokumentenenbene 201 | 30.00 202 | 400.00 203 | 1333.33 204 | 205 | Z 206 | 0 207 | 208 | VAT 209 | 210 | 211 | 212 | 213 | false 214 | Grund für Nachlass 2 215 | 80.00 216 | 1500.00 217 | 1875.00 218 | 219 | E 220 | 0 221 | 222 | VAT 223 | 224 | 225 | 226 | 227 | 510.00 228 | 229 | 400.00 230 | 0 231 | 232 | Z 233 | 0 234 | 235 | VAT 236 | 237 | 238 | 239 | 240 | 10000.00 241 | 700.00 242 | 243 | S 244 | 7 245 | 246 | VAT 247 | 248 | 249 | 250 | 251 | -1000.00 252 | -190.00 253 | 254 | S 255 | 19 256 | 257 | VAT 258 | 259 | 260 | 261 | 262 | -1500.00 263 | 0 264 | 265 | E 266 | 0 267 | Grund für die Befreiung 268 | 269 | VAT 270 | 271 | 272 | 273 | 274 | 275 | 10000.00 276 | 7900.00 277 | 8410.00 278 | 2500.00 280 | 400.00 281 | 500.00 282 | 210.00 284 | 8120.00 285 | 286 | 287 | 123 288 | 10.00 289 | 10000.00 290 | BRE 291 | 292 | 2018-10-05 293 | 2018-10-07 294 | 295 | 296 | RPB 297 | 298 | 299 | 7362789 300 | 130 301 | 302 | 303 | false 304 | Grund Nachlass 1 305 | 50.00 306 | 100.00 307 | 200.00 308 | 309 | 310 | false 311 | Grund Nachlass 2 312 | 10.00 313 | 10.00 314 | 100.00 315 | 316 | 317 | true 318 | Grund Zuschlag 1 319 | 10.00 320 | 10.00 321 | 100.00 322 | 323 | 324 | true 325 | Grund Zuschlag 2 326 | 50.00 327 | 100.00 328 | 200.00 329 | 330 | 331 | Beschreibung Artikel 332 | Bezeichung Artikel 333 | 334 | BB 335 | 336 | 337 | 456 338 | 339 | 340 | 1234567890128 341 | 342 | 343 | 12344321 344 | 345 | 346 | S 347 | 7 348 | 349 | VAT 350 | 351 | 352 | 353 | Farbe 354 | blau 355 | 356 | 357 | Größe 358 | XL 359 | 360 | 361 | 362 | 1000 363 | 364 | 365 | -------------------------------------------------------------------------------- /src/test/instances/wrong-date-with-text-uncefact.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 9 | 10 | 11 | urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 12 | 13 | 14 | 15 | 123456XX 16 | 380 17 | 18 | Dies ist kein Datum 19 | 20 | 21 | Es gelten unsere Allgem. Geschäftsbedingungen, die Sie unter […] finden. 22 | ADU 23 | 24 | 25 | 26 | 27 | 28 | Zeitschrift [...] 29 | 30 | Die letzte Lieferung im Rahmen des abgerechneten Abonnements erfolgt in 12/2016 Lieferung erfolgt / erfolgte direkt vom Verlag 31 | 32 | 33 | 34 | 246 35 | Zeitschrift [...] 36 | Zeitschrift Inland 37 | 38 | 0721-880X 39 | 40 | 41 | 42 | 43 | 6171175.1 44 | 45 | 46 | 288.79 47 | 48 | 49 | 50 | 1 51 | 52 | 53 | 54 | VAT 55 | S 56 | 7 57 | 58 | 59 | 60 | 20160101 61 | 62 | 63 | 20161231 64 | 65 | 66 | 67 | 288.79 68 | 69 | 70 | 71 | 72 | 73 | Porto + Versandkosten 74 | 75 | 76 | Porto + Versandkosten 77 | 78 | 79 | 80 | 26.07 81 | 82 | 83 | 84 | 1 85 | 86 | 87 | 88 | VAT 89 | S 90 | 7 91 | 92 | 93 | 26.07 94 | 95 | 96 | 97 | 98 | 04011000-12345-03 99 | 100 | [Seller name] 101 | 123/456/7890, HRA-Eintrag in […] 102 | 103 | [HRA-Eintrag] 104 | [Seller trading name] 105 | 106 | 107 | nicht vorhanden 108 | 109 | +49 1234-5678 110 | 111 | 112 | seller@email.de 113 | 114 | 115 | 116 | 12345 117 | [Seller address line 1] 118 | [Seller city] 119 | DE 120 | 121 | 122 | seller@seller.com 123 | 124 | 125 | DE 123456789 126 | 127 | 128 | 129 | [Buyer identifier] 130 | [Buyer name] 131 | 132 | 12345 133 | [Buyer address line 1] 134 | [Buyer city] 135 | DE 136 | 137 | 138 | buyer@buyer.com 139 | 140 | 141 | 142 | 143 | 144 | EUR 145 | 146 | 58 147 | 148 | 149 | DE75512108001245126199 150 | 151 | 152 | 153 | 22.04 154 | VAT 155 | 314.86 156 | S 157 | 7 158 | 159 | 160 | Zahlbar sofort ohne Abzug. 161 | 162 | 163 | 314.86 164 | 314.86 165 | 22.04 166 | 336.9 167 | 336.9 168 | 169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /src/test/instances/wrong-date-with-zeros-uncefact.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 9 | 10 | 11 | urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 12 | 13 | 14 | 15 | 123456XX 16 | 380 17 | 18 | 00000000 19 | 20 | 21 | Es gelten unsere Allgem. Geschäftsbedingungen, die Sie unter […] finden. 22 | ADU 23 | 24 | 25 | 26 | 27 | 28 | Zeitschrift [...] 29 | 30 | Die letzte Lieferung im Rahmen des abgerechneten Abonnements erfolgt in 12/2016 Lieferung erfolgt / erfolgte direkt vom Verlag 31 | 32 | 33 | 34 | 246 35 | Zeitschrift [...] 36 | Zeitschrift Inland 37 | 38 | 0721-880X 39 | 40 | 41 | 42 | 43 | 6171175.1 44 | 45 | 46 | 288.79 47 | 48 | 49 | 50 | 1 51 | 52 | 53 | 54 | VAT 55 | S 56 | 7 57 | 58 | 59 | 60 | 20160101 61 | 62 | 63 | 20161231 64 | 65 | 66 | 67 | 288.79 68 | 69 | 70 | 71 | 72 | 73 | Porto + Versandkosten 74 | 75 | 76 | Porto + Versandkosten 77 | 78 | 79 | 80 | 26.07 81 | 82 | 83 | 84 | 1 85 | 86 | 87 | 88 | VAT 89 | S 90 | 7 91 | 92 | 93 | 26.07 94 | 95 | 96 | 97 | 98 | 04011000-12345-03 99 | 100 | [Seller name] 101 | 123/456/7890, HRA-Eintrag in […] 102 | 103 | [HRA-Eintrag] 104 | [Seller trading name] 105 | 106 | 107 | nicht vorhanden 108 | 109 | +49 1234-5678 110 | 111 | 112 | seller@email.de 113 | 114 | 115 | 116 | 12345 117 | [Seller address line 1] 118 | [Seller city] 119 | DE 120 | 121 | 122 | seller@seller.com 123 | 124 | 125 | DE 123456789 126 | 127 | 128 | 129 | [Buyer identifier] 130 | [Buyer name] 131 | 132 | 12345 133 | [Buyer address line 1] 134 | [Buyer city] 135 | DE 136 | 137 | 138 | buyer@buyer.com 139 | 140 | 141 | 142 | 143 | 144 | EUR 145 | 146 | 58 147 | 148 | 149 | DE75512108001245126199 150 | 151 | 152 | 153 | 22.04 154 | VAT 155 | 314.86 156 | S 157 | 7 158 | 159 | 160 | Zahlbar sofort ohne Abzug. 161 | 162 | 163 | 314.86 164 | 314.86 165 | 22.04 166 | 336.9 167 | 336.9 168 | 169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /src/xsl/FileSaver-v2.0.5.js: -------------------------------------------------------------------------------- 1 | (function (global, factory) { 2 | if (typeof define === "function" && define.amd) { 3 | define([], factory); 4 | } else if (typeof exports !== "undefined") { 5 | factory(); 6 | } else { 7 | var mod = { 8 | exports: {} 9 | }; 10 | factory(); 11 | global.FileSaver = mod.exports; 12 | } 13 | })(this, function () { 14 | "use strict"; 15 | 16 | /* 17 | * FileSaver.js 18 | * A saveAs() FileSaver implementation. 19 | * 20 | * By Eli Grey, http://eligrey.com 21 | * 22 | * License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT) 23 | * source : http://purl.eligrey.com/github/FileSaver.js 24 | */ 25 | // The one and only way of getting global scope in all environments 26 | // https://stackoverflow.com/q/3277182/1008999 27 | var _global = typeof window === 'object' && window.window === window ? window : typeof self === 'object' && self.self === self ? self : typeof global === 'object' && global.global === global ? global : void 0; 28 | 29 | function bom(blob, opts) { 30 | if (typeof opts === 'undefined') opts = { 31 | autoBom: false 32 | };else if (typeof opts !== 'object') { 33 | console.warn('Deprecated: Expected third argument to be a object'); 34 | opts = { 35 | autoBom: !opts 36 | }; 37 | } // prepend BOM for UTF-8 XML and text/* types (including HTML) 38 | // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF 39 | 40 | if (opts.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { 41 | return new Blob([String.fromCharCode(0xFEFF), blob], { 42 | type: blob.type 43 | }); 44 | } 45 | 46 | return blob; 47 | } 48 | 49 | function download(url, name, opts) { 50 | var xhr = new XMLHttpRequest(); 51 | xhr.open('GET', url); 52 | xhr.responseType = 'blob'; 53 | 54 | xhr.onload = function () { 55 | saveAs(xhr.response, name, opts); 56 | }; 57 | 58 | xhr.onerror = function () { 59 | console.error('could not download file'); 60 | }; 61 | 62 | xhr.send(); 63 | } 64 | 65 | function corsEnabled(url) { 66 | var xhr = new XMLHttpRequest(); // use sync to avoid popup blocker 67 | 68 | xhr.open('HEAD', url, false); 69 | 70 | try { 71 | xhr.send(); 72 | } catch (e) {} 73 | 74 | return xhr.status >= 200 && xhr.status <= 299; 75 | } // `a.click()` doesn't work for all browsers (#465) 76 | 77 | 78 | function click(node) { 79 | try { 80 | node.dispatchEvent(new MouseEvent('click')); 81 | } catch (e) { 82 | var evt = document.createEvent('MouseEvents'); 83 | evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null); 84 | node.dispatchEvent(evt); 85 | } 86 | } // Detect WebView inside a native macOS app by ruling out all browsers 87 | // We just need to check for 'Safari' because all other browsers (besides Firefox) include that too 88 | // https://www.whatismybrowser.com/guides/the-latest-user-agent/macos 89 | 90 | 91 | var isMacOSWebView = _global.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent); 92 | var saveAs = _global.saveAs || ( // probably in some web worker 93 | typeof window !== 'object' || window !== _global ? function saveAs() {} 94 | /* noop */ 95 | // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView 96 | : 'download' in HTMLAnchorElement.prototype && !isMacOSWebView ? function saveAs(blob, name, opts) { 97 | var URL = _global.URL || _global.webkitURL; 98 | var a = document.createElement('a'); 99 | name = name || blob.name || 'download'; 100 | a.download = name; 101 | a.rel = 'noopener'; // tabnabbing 102 | // TODO: detect chrome extensions & packaged apps 103 | // a.target = '_blank' 104 | 105 | if (typeof blob === 'string') { 106 | // Support regular links 107 | a.href = blob; 108 | 109 | if (a.origin !== location.origin) { 110 | corsEnabled(a.href) ? download(blob, name, opts) : click(a, a.target = '_blank'); 111 | } else { 112 | click(a); 113 | } 114 | } else { 115 | // Support blobs 116 | a.href = URL.createObjectURL(blob); 117 | setTimeout(function () { 118 | URL.revokeObjectURL(a.href); 119 | }, 4E4); // 40s 120 | 121 | setTimeout(function () { 122 | click(a); 123 | }, 0); 124 | } 125 | } // Use msSaveOrOpenBlob as a second approach 126 | : 'msSaveOrOpenBlob' in navigator ? function saveAs(blob, name, opts) { 127 | name = name || blob.name || 'download'; 128 | 129 | if (typeof blob === 'string') { 130 | if (corsEnabled(blob)) { 131 | download(blob, name, opts); 132 | } else { 133 | var a = document.createElement('a'); 134 | a.href = blob; 135 | a.target = '_blank'; 136 | setTimeout(function () { 137 | click(a); 138 | }); 139 | } 140 | } else { 141 | navigator.msSaveOrOpenBlob(bom(blob, opts), name); 142 | } 143 | } // Fallback to using FileReader and a popup 144 | : function saveAs(blob, name, opts, popup) { 145 | // Open a popup immediately do go around popup blocker 146 | // Mostly only available on user interaction and the fileReader is async so... 147 | popup = popup || open('', '_blank'); 148 | 149 | if (popup) { 150 | popup.document.title = popup.document.body.innerText = 'downloading...'; 151 | } 152 | 153 | if (typeof blob === 'string') return download(blob, name, opts); 154 | var force = blob.type === 'application/octet-stream'; 155 | 156 | var isSafari = /constructor/i.test(_global.HTMLElement) || _global.safari; 157 | 158 | var isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent); 159 | 160 | if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== 'undefined') { 161 | // Safari doesn't allow downloading of blob URLs 162 | var reader = new FileReader(); 163 | 164 | reader.onloadend = function () { 165 | var url = reader.result; 166 | url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, 'data:attachment/file;'); 167 | if (popup) popup.location.href = url;else location = url; 168 | popup = null; // reverse-tabnabbing #460 169 | }; 170 | 171 | reader.readAsDataURL(blob); 172 | } else { 173 | var URL = _global.URL || _global.webkitURL; 174 | var url = URL.createObjectURL(blob); 175 | if (popup) popup.location = url;else location.href = url; 176 | popup = null; // reverse-tabnabbing #460 177 | 178 | setTimeout(function () { 179 | URL.revokeObjectURL(url); 180 | }, 4E4); // 40s 181 | } 182 | }); 183 | _global.saveAs = saveAs.saveAs = saveAs; 184 | 185 | if (typeof module !== 'undefined') { 186 | module.exports = saveAs; 187 | } 188 | }); 189 | -------------------------------------------------------------------------------- /src/xsl/common-xr.xsl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 30 | 31 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 48 | 49 | 50 | 51 | 52 | 55 | 56 | ILLEGAL DATE FORMAT of "". 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | Liefert einen XPath-Pfad, welches $n eindeutig identifiziert. 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | Liefert einen XPath-Pfad, welches $n eindeutig identifiziert. 121 | 122 | 123 | 124 | 125 | / 126 | 127 | 129 | [ 130 | 131 | ] 132 | 133 | 134 | 135 | /@ 136 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /src/xsl/functions.xsl: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /src/xsl/xr-pdf.xsl: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 36 | normal 37 | 38 | 45 | normal 46 | 47 | 50 | 2 7 2 2 2 2 1.3 2 51 | 52 | 53 | 54 | 55 | 56 | 59 | 60 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /src/xsl/xr-pdf/lib/konstanten.xsl: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 14 | 15 | SourceSerifPro 16 | SourceSerifPro 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | 9pt 30 | 12pt 31 | 3 32 | true 33 | de 34 | 35 | 36 | 37 | 38 | 18pt 39 | 40 | false 41 | all 42 | 43 | 44 | 45 | 46 | 18pt 47 | 48 | bold 49 | 4mm 50 | false 51 | all 52 | always 53 | 54 | 55 | 56 | 57 | 0.5pt solid 58 | 2.5pt 59 | all 60 | 4mm 61 | always 62 | 63 | 64 | 65 | 66 | 9pt 67 | 68 | bold 69 | 0.5pt solid 70 | 4pt 6pt 71 | always 72 | 0 73 | 74 | 75 | 76 | 77 | 10pt 78 | 79 | bold 80 | 1mm 81 | 2mm 82 | 2mm 83 | all 84 | always 85 | 86 | 87 | 88 | 89 | 2mm 90 | 3mm 91 | 0.5pt dotted 92 | #999999 93 | always 94 | 95 | 96 | 97 | #eeeeee 98 | 30 99 | 100 | 101 | 7pt 102 | 10pt 103 | 1mm 104 | 1mm 105 | 2mm 106 | 1mm 107 | 108 | 109 | 110 | 9pt 111 | 10pt 112 | 113 | 1mm 114 | 1mm 115 | 2mm 116 | 2mm 117 | always 118 | 119 | 120 | 121 | 122 | 9pt 123 | left 124 | 0.2mm 125 | 0.2mm 126 | 0mm 127 | 1mm 128 | 0mm 129 | always 130 | 131 | 132 | 133 | 9pt 134 | left 135 | 0.2mm 136 | 0.2mm 137 | 0mm 138 | 1mm 139 | 0mm 140 | always 141 | 142 | 143 | 144 | 9pt 145 | right 146 | 0.2mm 147 | 0.2mm 148 | 0mm 149 | 0mm 150 | 0mm 151 | always 152 | 153 | 154 | 155 | 9pt 156 | left 157 | 0.4mm 158 | 0.2mm 159 | 0mm 160 | 1mm 161 | 0.1pt solid #999999 162 | always 163 | 164 | 165 | 166 | 9pt 167 | left 168 | 0.4mm 169 | 0.2mm 170 | 0mm 171 | 1mm 172 | 0.1pt solid #999999 173 | always 174 | 175 | 176 | 177 | 9pt 178 | bold 179 | right 180 | 0.4mm 181 | 0.2mm 182 | 0mm 183 | 0mm 184 | 0.1pt solid #999999 185 | always 186 | 187 | 188 | 189 | 190 | 10mm 191 | 192 | 193 | 194 | 2mm 195 | always 196 | all 197 | 198 | 199 | 200 | 2mm 201 | 202 | 203 | 204 | 205 | 2pt 206 | 2pt 207 | 100% 208 | fixed 209 | 2mm 210 | 211 | 212 | 213 | bold 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 80% 223 | italic 224 | 225 | 226 | 227 | 2pt 228 | 2pt 229 | 100% 230 | fixed 231 | 80% 232 | italic 233 | 234 | 235 | -------------------------------------------------------------------------------- /src/xsl/xr-pdf/lib/structure/layout-master-set.xsl: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 13 | 14 | 18 | 19 | 21 | 22 | 24 | 25 | 27 | 28 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/xsl/xr-pdf/lib/structure/page-sequence.xsl: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | / 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 54 | 57 | / 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/xsl/xrechnung-viewer.css: -------------------------------------------------------------------------------- 1 | /* Grundformatierung ********************************************/ 2 | 3 | *, 4 | *:after, 5 | *:before 6 | { 7 | box-sizing: border-box; 8 | -moz-box-sizing: border-box; 9 | } 10 | 11 | .clear:after 12 | { 13 | content: "."; 14 | clear: both; 15 | display: block; 16 | visibility: hidden; 17 | height: 0; 18 | } 19 | 20 | html, 21 | body 22 | { 23 | height: 100%; 24 | min-width: 320px; 25 | margin: 0; 26 | padding: 0; 27 | color: #000; 28 | font-size: 14px; 29 | } 30 | 31 | body 32 | { 33 | overflow-y: scroll; 34 | background-color: rgba(4, 101, 161, 0.08); 35 | } 36 | 37 | h4 38 | { 39 | color: inherit; 40 | font-size: inherit; 41 | margin-bottom: 0.5rem; 42 | } 43 | 44 | 45 | /* Grundaufbau *************************************************/ 46 | 47 | .menue 48 | { 49 | position: relative; 50 | z-index: 2000; 51 | background-color: #000; 52 | margin-bottom: 30px; 53 | } 54 | 55 | .innen 56 | { 57 | max-width: 1080px; 58 | margin: 0 auto; 59 | padding: 0 2%; 60 | } 61 | 62 | .menue .innen div { 63 | display: inline-block; 64 | margin: 0 16px; 65 | } 66 | 67 | 68 | /* Formatierungen *************************************************/ 69 | 70 | .color2 71 | { 72 | color: rgba(0, 0, 0, 0.6); 73 | } 74 | 75 | .schwarz 76 | { 77 | color: #555 !important; 78 | } 79 | 80 | .normal 81 | { 82 | font-weight: normal; 83 | } 84 | 85 | .bold 86 | { 87 | font-weight: bold; 88 | } 89 | 90 | .abstandUnten 91 | { 92 | margin-bottom: 5px; 93 | } 94 | 95 | .abstandUntenKlein 96 | { 97 | margin-bottom: 10px; 98 | } 99 | 100 | .noPaddingTop 101 | { 102 | padding-top: 0 !important; 103 | } 104 | 105 | .ausrichtungRechts 106 | { 107 | text-align: right; 108 | } 109 | 110 | 111 | 112 | 113 | /* Menü ********************************************************/ 114 | 115 | button 116 | { 117 | position: relative; 118 | font-family: serif; 119 | padding-top: 15px; 120 | padding-left: 0; 121 | padding-right: 0; 122 | margin-right: 2%; 123 | } 124 | 125 | .btnAktiv 126 | { 127 | font-size: 22px; 128 | color: #ffb619; 129 | height: 50px; 130 | outline: none; 131 | border: none; 132 | background: none; 133 | } 134 | 135 | .btnAktiv:after 136 | { 137 | content: ""; 138 | display: block; 139 | position: absolute; 140 | top: 50px; 141 | left: 50%; 142 | z-index: 10; 143 | font-size: 0; 144 | line-height: 0; 145 | height: 0; 146 | padding: 0; 147 | margin: 0; 148 | transform: translateX(-50%); 149 | border: 15px solid #000; 150 | border-right-color: transparent; 151 | border-bottom-color: transparent; 152 | border-left-color: transparent; 153 | } 154 | 155 | .btnInaktiv, 156 | .tab 157 | { 158 | font-size: 22px; 159 | color: #fff; 160 | height: 50px; 161 | z-index: 0; 162 | outline: none; 163 | border: none; 164 | background: none; 165 | transition: color 0.3s ease; 166 | } 167 | 168 | .btnInaktiv:hover, 169 | .tab:hover 170 | { 171 | color: #ffb619; 172 | cursor: pointer; 173 | } 174 | 175 | .divHide 176 | { 177 | display: none; 178 | } 179 | 180 | /* Content *********************************************************************/ 181 | 182 | .inhalt 183 | { 184 | font-family: sans-serif; 185 | margin-bottom: 30px; 186 | } 187 | 188 | .noscript 189 | { 190 | color: #000; 191 | text-align: center; 192 | padding: 20px; 193 | margin-bottom: 30px; 194 | width: 100%; 195 | border: 1px solid #ff6347; 196 | background-color: #ffd5ce; 197 | } 198 | 199 | .haftungausschluss 200 | { 201 | color: #000; 202 | text-align: center; 203 | padding: 7px; 204 | margin-bottom: 30px; 205 | width: 100%; 206 | border: 1px solid #ffb619; 207 | background-color: #fff; 208 | } 209 | 210 | .box 211 | { 212 | position: relative; 213 | display: table-cell; 214 | padding: 0; 215 | border: 1px solid rgba(4, 101, 161, 0.2); 216 | background-color: #fff; 217 | } 218 | 219 | .subBox 220 | { 221 | border-top: none; 222 | width: 50%; 223 | } 224 | 225 | .subBox:last-child 226 | { 227 | border-left: none; 228 | } 229 | 230 | .first > .boxzeile > .subBox 231 | { 232 | border-top: 1px solid rgba(4, 101, 161, 0.2) !important; 233 | } 234 | 235 | .boxtitel 236 | { 237 | display: inline-block; 238 | background-color: #0465A1; 239 | padding: 7px 10px; 240 | color: #fff; 241 | font-weight: bold; 242 | } 243 | 244 | .boxBorderTop 245 | { 246 | border-top: none; 247 | } 248 | 249 | .boxBorderLeft 250 | { 251 | border-left: none; 252 | } 253 | 254 | .boxtitelSub 255 | { 256 | color: #000; 257 | background-color: rgba(4, 101, 161, 0.1); 258 | border-right: 1px solid rgba(4, 101, 161, 0.2); 259 | border-bottom: 1px solid rgba(4, 101, 161, 0.2); 260 | } 261 | 262 | .boxinhalt 263 | { 264 | padding: 15px 20px; 265 | } 266 | 267 | .boxtabelle 268 | { 269 | display: table; 270 | width: 100%; 271 | } 272 | 273 | .borderSpacing 274 | { 275 | border-spacing: 0 5px; 276 | } 277 | 278 | .boxabstandtop 279 | { 280 | margin-top: 30px; 281 | } 282 | 283 | .boxzeile 284 | { 285 | display: table-row; 286 | } 287 | 288 | .boxzeile .box:last-child 289 | { 290 | margin-bottom: 0; 291 | } 292 | 293 | .boxdaten 294 | { 295 | display: table-cell; 296 | padding: 5px 0; 297 | vertical-align: middle; 298 | height: 38px; 299 | /* 300 | -ms-word-break: break-all; 301 | word-break: break-all; 302 | word-break: break-word; 303 | -webkit-hyphens: auto; 304 | -moz-hyphens: auto; 305 | hyphens: auto; 306 | */ 307 | } 308 | 309 | .boxdaten.wert 310 | { 311 | padding: 5px 10px; 312 | } 313 | 314 | .boxcell 315 | { 316 | display: table-cell; 317 | } 318 | 319 | .boxdatenBlock 320 | { 321 | display: block; 322 | padding: 3px 0; 323 | /* 324 | -ms-word-break: break-all; 325 | word-break: break-all; 326 | word-break: break-word; 327 | -webkit-hyphens: auto; 328 | -moz-hyphens: auto; 329 | hyphens: auto; 330 | */ 331 | } 332 | 333 | .noBreak 334 | { 335 | -ms-word-break: keep-all; 336 | word-break: keep-all; 337 | word-break: keep-all; 338 | -webkit-hyphens: none; 339 | -moz-hyphens: none; 340 | hyphens: none; 341 | } 342 | 343 | .boxabstand 344 | { 345 | display: table-cell; 346 | width: 30px; 347 | } 348 | 349 | .legende 350 | { 351 | color: rgba(0, 0, 0, 0.6); 352 | width: 170px; 353 | font-size: 13px; 354 | line-height: 16px; 355 | padding-right: 5px; 356 | } 357 | 358 | .wert 359 | { 360 | background-color: rgba(4, 101, 161, 0.03); 361 | } 362 | 363 | .boxtabelleEinspaltig 364 | { 365 | width: 49%; 366 | } 367 | 368 | .boxtabelleZweispaltig, 369 | .boxtabelleDreispaltig 370 | { 371 | width: 100%; 372 | } 373 | 374 | .box5050 375 | { 376 | width: 50%; 377 | } 378 | 379 | .boxEinspaltig 380 | { 381 | width: 100%; 382 | } 383 | 384 | .boxZweispaltig 385 | { 386 | width: 48.5%; 387 | } 388 | 389 | .boxSpalte1 { 390 | width: 50%; 391 | } 392 | 393 | .boxSpalte2 { 394 | width: 50%; 395 | padding-left: 20px; 396 | } 397 | 398 | .paddingLeft { 399 | padding-left: 0.1em; 400 | } 401 | 402 | .noPadding { 403 | padding-top: 0 !important; 404 | padding-bottom: 0 !important; 405 | } 406 | 407 | .rechnungsZeile 408 | { 409 | display: table-row; 410 | } 411 | 412 | .rechnungsZeile .boxdaten 413 | { 414 | height: auto; 415 | } 416 | 417 | .rechnungSp1 418 | { 419 | width: 65%; 420 | font-size: 16px; 421 | } 422 | 423 | .rechnungSp2 424 | { 425 | width: 10%; 426 | } 427 | 428 | .rechnungSp3 429 | { 430 | width: 25%; 431 | font-size: 16px; 432 | text-align: right; 433 | } 434 | 435 | .detailSp1, 436 | .detailSp2 437 | { 438 | width: 50%; 439 | } 440 | 441 | .detailSp2 442 | { 443 | text-align: right; 444 | } 445 | 446 | .line1Bottom 447 | { 448 | border-bottom: 1px solid #000; 449 | } 450 | 451 | .line1BottomLight 452 | { 453 | padding-bottom: 5px; 454 | border-bottom: 1px solid #f0f0f0; 455 | margin-bottom: 5px; 456 | } 457 | 458 | .line2Bottom 459 | { 460 | border-bottom: 2px solid #000; 461 | } 462 | 463 | .paddingTop 464 | { 465 | padding-top: 10px; 466 | } 467 | 468 | .paddingBottom 469 | { 470 | padding-bottom: 10px; 471 | } 472 | 473 | .grund 474 | { 475 | font-size: 16px; 476 | display: block; 477 | width: 100%; 478 | padding: 0 20px 15px 20px; 479 | } 480 | 481 | .grundDetail 482 | { 483 | display: block; 484 | width: 100%; 485 | padding: 0 20px 15px 20px; 486 | } 487 | 488 | /* Übersichtformatierungen */ 489 | #uebersichtLastschrift.box, 490 | #uebersichtUeberweisung.box 491 | { 492 | border-top: none; 493 | } 494 | 495 | #uebersichtUeberweisung.box 496 | { 497 | border-left: none; 498 | } 499 | 500 | 501 | /* Formatierungen Detailseite */ 502 | 503 | .detailsSpalte1, 504 | .detailsSpalte2 505 | { 506 | width: 30%; 507 | float: left; 508 | font-size: 90%; 509 | line-height: 115%; 510 | margin-right: 5%; 511 | } 512 | 513 | .detailsSpalte3 514 | { 515 | width: 30%; 516 | float: left; 517 | font-size: 90%; 518 | line-height: 115%; 519 | } 520 | 521 | .detailsSpalte1 .legende, 522 | .detailsSpalte2 .legende, 523 | .detailsSpalte3 .legende 524 | { 525 | width: 145px; 526 | } 527 | 528 | .titelPosition 529 | { 530 | font-size: 17px; 531 | font-weight: bold; 532 | } 533 | 534 | 535 | /* Laufzettelformatierungen */ 536 | #laufzettelHistorie .boxtabelle:not(:nth-child(2)) 537 | { 538 | border-top: 1px solid rgba(4, 101, 161, 0.2); 539 | padding-top: 10px; 540 | margin-top: 10px; 541 | } 542 | 543 | 544 | 545 | 546 | 547 | /* 1023px und kleiner ************************************************/ 548 | 549 | @media screen and (max-width : 1023px) { 550 | 551 | .box 552 | { 553 | display: block; 554 | width: 100%; 555 | margin-bottom: 20px; 556 | } 557 | 558 | .boxabstandtop 559 | { 560 | margin-top: 15px; 561 | } 562 | 563 | .subBox:first-child 564 | { 565 | margin-bottom: 0 !important; 566 | } 567 | 568 | .subBox:last-child 569 | { 570 | border-left: 1px solid rgba(4, 101, 161, 0.2); 571 | } 572 | 573 | .first > .boxzeile > .subBox 574 | { 575 | border-top: none !important; 576 | } 577 | 578 | .first > .boxzeile > .subBox:first-child 579 | { 580 | border-top: 1px solid rgba(4, 101, 161, 0.2) !important; 581 | } 582 | 583 | .first > .boxzeile 584 | { 585 | margin-bottom: 0; 586 | } 587 | 588 | #uebersichtUeberweisung.box 589 | { 590 | border-left: 1px solid rgba(4, 101, 161, 0.2); 591 | } 592 | 593 | #uebersichtLastschrift.box 594 | { 595 | margin-bottom: 0; 596 | } 597 | 598 | .boxzeile 599 | { 600 | display: block; 601 | margin-bottom: 5px; 602 | } 603 | 604 | .boxzeile:after 605 | { 606 | visibility: hidden; 607 | display: block; 608 | font-size: 0; 609 | content: " "; 610 | clear: both; 611 | height: 0; 612 | } 613 | 614 | #details > .boxtabelle > .boxzeile 615 | { 616 | margin-bottom: 0px; 617 | } 618 | 619 | .boxcell 620 | { 621 | display: block; 622 | } 623 | 624 | .boxcell:last-child 625 | { 626 | margin-top: 20px; 627 | } 628 | 629 | .boxZweispaltig 630 | { 631 | width: 100%; 632 | } 633 | 634 | .legende 635 | { 636 | display: block; 637 | float: left; 638 | width: 170px; 639 | padding: 5px 0; 640 | height: auto; 641 | } 642 | 643 | .wert 644 | { 645 | display: block; 646 | float: left; 647 | width: calc(100% - 170px); 648 | padding: 11px 10px !important; 649 | line-height: 1.3; 650 | min-height: 38px; 651 | height: auto; 652 | } 653 | 654 | .boxdaten .legende 655 | { 656 | height: auto; 657 | } 658 | 659 | .rechnungsZeile .boxdaten 660 | { 661 | padding: 5px 0; 662 | } 663 | 664 | .boxabstand 665 | { 666 | display: none; 667 | } 668 | 669 | .boxtabelleEinspaltig { 670 | width: 100%; 671 | } 672 | 673 | .boxSpalte1 { 674 | display: block; 675 | width: auto; 676 | } 677 | 678 | .boxSpalte2 { 679 | display: block; 680 | width: auto; 681 | padding-left: 0px; 682 | margin-top: 1.2rem; 683 | } 684 | 685 | .detailsSpalte1, 686 | .detailsSpalte2, 687 | .detailsSpalte3 688 | { 689 | width: 100%; 690 | float: none; 691 | padding-right: 0px; 692 | } 693 | 694 | .detailsSpalte2, 695 | .detailsSpalte3 696 | { 697 | margin-top: 15px; 698 | } 699 | 700 | .detailsSpalte2, 701 | .detailsSpalte3 702 | { 703 | margin-top: 10px; 704 | } 705 | 706 | .tableNumberAlignRight 707 | { 708 | display: block; 709 | width: 130px; 710 | text-align: right; 711 | } 712 | } 713 | 714 | 715 | 716 | /* 800px und kleiner ************************************************/ 717 | 718 | @media screen and (max-width : 800px) { 719 | 720 | button 721 | { 722 | padding-top: 10px; 723 | } 724 | 725 | .btnAktiv, 726 | .btnInaktiv, 727 | .tab 728 | { 729 | font-size: 20px; 730 | height: 40px; 731 | } 732 | 733 | .btnAktiv:after 734 | { 735 | top: 40px; 736 | } 737 | 738 | .rechnungSp1 739 | { 740 | width: 55%; 741 | font-size: 15px; 742 | } 743 | 744 | .rechnungSp2 745 | { 746 | width: 10%; 747 | } 748 | 749 | .rechnungSp3 750 | { 751 | width: 35%; 752 | text-align: right; 753 | font-size: 15px; 754 | } 755 | 756 | .grund 757 | { 758 | font-size: 15px; 759 | } 760 | } 761 | 762 | /* 450px und kleiner ************************************************/ 763 | 764 | @media screen and (max-width : 450px) 765 | { 766 | 767 | html, 768 | body 769 | { 770 | font-size: 12px; 771 | } 772 | 773 | .menue 774 | { 775 | margin-bottom: 20px; 776 | } 777 | 778 | button 779 | { 780 | padding-top: 5px; 781 | } 782 | 783 | .btnAktiv, 784 | .btnInaktiv, 785 | .tab 786 | { 787 | font-size: 17px; 788 | height: 35px; 789 | } 790 | 791 | .btnAktiv:after 792 | { 793 | top: 35px; 794 | } 795 | 796 | .legende 797 | { 798 | font-size: 12px; 799 | width: 100%; 800 | } 801 | 802 | .wert 803 | { 804 | font-size: 12px; 805 | line-height: 1.3; 806 | width: 100%; 807 | margin-bottom: 10px 808 | } 809 | 810 | .boxzeile 811 | { 812 | margin-bottom: 0px 813 | } 814 | 815 | .boxdaten 816 | { 817 | height: auto; 818 | } 819 | 820 | .haftungausschluss 821 | { 822 | margin-bottom: 20px; 823 | } 824 | 825 | .boxinhalt 826 | { 827 | margin-top: 0px; 828 | } 829 | 830 | .boxabstandtop 831 | { 832 | margin-top: 20px; 833 | } 834 | 835 | .boxtitel 836 | { 837 | padding: 7px 8px; 838 | } 839 | 840 | .box 841 | { 842 | margin-bottom: 10px; 843 | padding: 0; 844 | } 845 | 846 | .boxabstandtop 847 | { 848 | margin-top: 10px; 849 | } 850 | 851 | .boxdaten, 852 | .boxdatenBlock 853 | { 854 | padding: 2px 0; 855 | } 856 | 857 | .rechnungSp1 858 | { 859 | width: 50%; 860 | font-size: inherit; 861 | } 862 | 863 | .rechnungSp2 864 | { 865 | width: 15%; 866 | } 867 | 868 | .rechnungSp3 869 | { 870 | width: 35%; 871 | font-size: inherit; 872 | text-align: right; 873 | } 874 | 875 | .grund 876 | { 877 | font-size: inherit; 878 | } 879 | 880 | .titelPosition 881 | { 882 | font-size: 15px; 883 | } 884 | 885 | .abstandUnten 886 | { 887 | margin-bottom: 5px; 888 | } 889 | 890 | .detailsSpalte1, 891 | .detailsSpalte2, 892 | .detailsSpalte3 893 | { 894 | font-size: inherit; 895 | line-height: inherit; 896 | } 897 | } 898 | 899 | /* 380px und kleiner ************************************************/ 900 | 901 | @media screen and (max-width : 380px) { 902 | 903 | html, 904 | body 905 | { 906 | font-size: 11px; 907 | line-height: 100%; 908 | } 909 | 910 | .btnAktiv, 911 | .btnInaktiv, 912 | .tab 913 | { 914 | font-size: 15px; 915 | } 916 | 917 | .boxdaten 918 | .boxdatenBlock 919 | { 920 | padding: 2px 0; 921 | } 922 | 923 | .boxinhalt 924 | { 925 | margin-top: 0px; 926 | } 927 | 928 | .boxtitel 929 | { 930 | padding: 5px 7px; 931 | } 932 | } 933 | -------------------------------------------------------------------------------- /src/xsl/xrechnung-viewer.js: -------------------------------------------------------------------------------- 1 | 2 | /* Tab-Container aufbauen **************************************************/ 3 | 4 | var a = new Array("uebersicht", "details", "zusaetze", "anlagen", "laufzettel"); 5 | var b = new Array("menueUebersicht", "menueDetails", "menueZusaetze", "menueAnlagen", "menueLaufzettel"); 6 | 7 | function show(e) { 8 | var i = 0; 9 | var j = 1; 10 | for (var t = 0; t < b.length; t++) { 11 | if (b[t] === e.id) { 12 | i = t; 13 | if (i > 0) { 14 | j = 0; 15 | } else { 16 | j = i + 1; 17 | } 18 | break; 19 | } 20 | } 21 | e.setAttribute("class", "btnAktiv"); 22 | e.setAttribute("aria-selected", "true"); 23 | for (var k = 0; k < b.length; k++) { 24 | if (k === i && (document.getElementById(a[k]) != null)) { 25 | document.getElementById(a[k]).style.display = "block"; 26 | if (i === j) 27 | j = i + 1; 28 | } else { 29 | if (document.getElementById(a[k]) != null) { 30 | document.getElementById(a[j]).style.display = "none"; 31 | document.getElementById(b[j]).setAttribute("class", "btnInaktiv"); 32 | document.getElementById(b[j]).setAttribute("aria-selected", "false"); 33 | j += 1; 34 | } 35 | } 36 | } 37 | } 38 | 39 | window.onload = function () { 40 | document.getElementById(b[0]).setAttribute("class", "btnAktiv"); 41 | document.getElementById(b[0]).setAttribute("aria-selected", "true"); 42 | // could be substituted by an xslt solution 43 | document.body.querySelectorAll('[data-title]').forEach(function(element, index) { 44 | element.setAttribute('title', element.getAttribute('data-title')); 45 | }); 46 | } 47 | 48 | /* Eingebettete Binaerdaten runterladen ************************************/ 49 | 50 | 51 | function base64_to_binary(data) { 52 | var chars = atob(data); 53 | var bytes = new Array(chars.length); 54 | for (var i = 0; i < chars.length; i++) { 55 | bytes[i] = chars.charCodeAt(i); 56 | } 57 | return new Uint8Array(bytes); 58 | } 59 | 60 | function downloadData(element_id, mimetype, filename) { 61 | var data_element = document.getElementById(element_id); 62 | var text = data_element.innerHTML; 63 | var binary = base64_to_binary(text); 64 | var blob = new Blob([binary], { 65 | type: mimetype, size: binary.length 66 | }); 67 | 68 | if (window.navigator && window.navigator.msSaveOrOpenBlob) { 69 | // IE 70 | window.navigator.msSaveOrOpenBlob(blob, filename); 71 | } else { 72 | saveAs(blob, filename); 73 | } 74 | } 75 | 76 | 77 | /* Polyfill IE atob/btoa ************************************/ 78 | 79 | (function (root, factory) { 80 | if (typeof define === 'function' && define.amd) { 81 | // AMD. Register as an anonymous module. 82 | define([], function () { 83 | factory(root); 84 | }); 85 | } else factory(root); 86 | // node.js has always supported base64 conversions, while browsers that support 87 | // web workers support base64 too, but you may never know. 88 | })(typeof exports !== "undefined" ? exports : this, function (root) { 89 | if (root.atob) { 90 | // Some browsers' implementation of atob doesn't support whitespaces 91 | // in the encoded string (notably, IE). This wraps the native atob 92 | // in a function that strips the whitespaces. 93 | // The original function can be retrieved in atob.original 94 | try { 95 | root.atob(" "); 96 | } catch (e) { 97 | root.atob = (function (atob) { 98 | var func = function (string) { 99 | return atob(String(string).replace(/[\t\n\f\r ]+/g, "")); 100 | }; 101 | func.original = atob; 102 | return func; 103 | })(root.atob); 104 | } 105 | return; 106 | } 107 | 108 | // base64 character set, plus padding character (=) 109 | var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", 110 | // Regular expression to check formal correctness of base64 encoded strings 111 | b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/; 112 | 113 | root.btoa = function (string) { 114 | string = String(string); 115 | var bitmap, a, b, c, 116 | result = "", i = 0, 117 | rest = string.length % 3; // To determine the final padding 118 | 119 | for (; i < string.length;) { 120 | if ((a = string.charCodeAt(i++)) > 255 || (b = string.charCodeAt(i++)) > 255 || (c = string.charCodeAt(i++)) > 255) 121 | throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range."); 122 | 123 | bitmap = (a << 16) | (b << 8) | c; 124 | result += b64.charAt(bitmap >> 18 & 63) + b64.charAt(bitmap >> 12 & 63) + b64.charAt(bitmap >> 6 & 63) + b64.charAt(bitmap & 63); 125 | } 126 | 127 | // If there's need of padding, replace the last 'A's with equal signs 128 | return rest ? result.slice(0, rest - 3) + "===".substring(rest) : result; 129 | }; 130 | 131 | root.atob = function (string) { 132 | // atob can work with strings with whitespaces, even inside the encoded part, 133 | // but only \t, \n, \f, \r and ' ', which can be stripped. 134 | string = String(string).replace(/[\t\n\f\r ]+/g, ""); 135 | if (!b64re.test(string)) 136 | throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded."); 137 | 138 | // Adding the padding if missing, for semplicity 139 | string += "==".slice(2 - (string.length & 3)); 140 | var bitmap, result = "", r1, r2, i = 0; 141 | for (; i < string.length;) { 142 | bitmap = b64.indexOf(string.charAt(i++)) << 18 | b64.indexOf(string.charAt(i++)) << 12 | (r1 = b64.indexOf(string.charAt(i++))) << 6 | (r2 = b64.indexOf(string.charAt(i++))); 143 | 144 | result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255); 145 | } 146 | return result; 147 | }; 148 | }); 149 | --------------------------------------------------------------------------------