From 6252b9fc478d1f0bc796b6a69d5f42742d75266e Mon Sep 17 00:00:00 2001 From: "Dr. Martin Goik" <goik@hdm-stuttgart.de> Date: Tue, 9 Jul 2019 21:58:46 +0200 Subject: [PATCH] New form applied --- .../addon/config/kkabrechnung/Xsl/common.xsl | 11 +- .../addon/config/kkabrechnung/Xsl/lbv.xsl | 214 +++++++++--------- 2 files changed, 117 insertions(+), 108 deletions(-) diff --git a/ws/Xmlmind/Files/addon/config/kkabrechnung/Xsl/common.xsl b/ws/Xmlmind/Files/addon/config/kkabrechnung/Xsl/common.xsl index 407b4602b..f7f089b2c 100644 --- a/ws/Xmlmind/Files/addon/config/kkabrechnung/Xsl/common.xsl +++ b/ws/Xmlmind/Files/addon/config/kkabrechnung/Xsl/common.xsl @@ -33,10 +33,9 @@ </xsl:template> <xsl:template match="kk:unfall"> - <fo:block font-size="14pt" font-weight="bold"> - <xsl:apply-templates select="." mode="nr"/> - <xsl:text>. </xsl:text> - <xsl:value-of select="kk:title"/> + <fo:block font-size="14pt" font-weight="bold"> + <xsl:value-of select="@datum"/> + <xsl:text>:</xsl:text> </fo:block> <xsl:apply-templates select="kk:para"/> </xsl:template> @@ -52,4 +51,8 @@ <xsl:value-of select="1 +count(preceding-sibling::kk:unfall)"/> </xsl:template> + <xsl:template match="kk:unfall" mode="datum"> + <xsl:value-of select="@datum"/> + </xsl:template> + </xsl:stylesheet> diff --git a/ws/Xmlmind/Files/addon/config/kkabrechnung/Xsl/lbv.xsl b/ws/Xmlmind/Files/addon/config/kkabrechnung/Xsl/lbv.xsl index 760877c4d..a147441f5 100644 --- a/ws/Xmlmind/Files/addon/config/kkabrechnung/Xsl/lbv.xsl +++ b/ws/Xmlmind/Files/addon/config/kkabrechnung/Xsl/lbv.xsl @@ -6,11 +6,13 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:kk="http://www.hdm-stuttgart.de/xmleditor/schema/kkabrechnung" > - + <xsl:include href="common.xsl"/> <xsl:output indent="yes" method="xml"/> + <xsl:decimal-format decimal-separator="," grouping-separator="." name="de"/> + <xsl:template match="/"> <fo:root language="de" @@ -25,7 +27,7 @@ <fo:simple-page-master master-name="pageLayout" page-height="297mm" page-width="210mm" margin-top="20mm" margin-bottom="20mm" - margin-left="20mm" margin-right="20mm"> + margin-left="10mm" margin-right="8mm"> <fo:region-body margin-top="20mm"/> <fo:region-before extent="20mm"/> </fo:simple-page-master> @@ -42,177 +44,181 @@ <xsl:apply-templates select="kk:abrechnung"/> </fo:flow> </fo:page-sequence> + + <fo:page-sequence master-reference="pageLayout"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block font-size="36pt" font-weight="bold"> + </fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body" font-size="12pt"> + <xsl:apply-templates select="kk:abrechnung/kk:unfaelle"/> + </fo:flow> + </fo:page-sequence> </fo:root> </xsl:template> - + <xsl:template match="kk:abrechnung"> <fo:block font-size="6pt" space-after="10mm">Landesamt für Besoldung und Versorgung, BaWü,<fo:inline font-weight="bold">70730</fo:inline> Fellbach</fo:block> - + <xsl:for-each select="anschreiben/para"> <fo:block space-after="3mm"> <xsl:value-of select="."/> </fo:block> </xsl:for-each> - + <fo:block text-align="center" space-after="3mm" space-before="20mm"> <xsl:value-of select="signature"/> </fo:block> - + <fo:block space-after="5mm">Personalnummer: 67297644/273G</fo:block> - <xsl:apply-templates select="kk:unfaelle"/> - + <fo:block font-size="16pt" font-weight="bold">Verordnungen:</fo:block> - + <fo:table border-style="solid" border-width="0.5pt"> - <fo:table-column column-width="9mm"/> - <fo:table-column column-width="20mm"/> - <fo:table-column column-width="25mm"/> - <fo:table-column column-width="33mm"/> - <fo:table-column column-width="19mm"/> - <fo:table-column column-width="19mm"/> - <fo:table-column column-width="15mm"/> - + <fo:table-column column-width="8.4mm" /> <!-- Spalte A --> + <fo:table-column column-width="32.6mm"/><!-- Spalte B --> + <fo:table-column column-width="30.5mm"/><!-- Spalte C --> + <fo:table-column column-width="30.5mm"/><!-- Spalte D --> + <fo:table-column column-width="30.5mm"/><!-- Spalte E --> + <fo:table-column column-width="30.5mm"/><!-- Spalte F --> + <fo:table-column column-width="30.5mm"/><!-- Spalte G --> + <fo:table-body border-width="0.5pt" border-style="solid"> - - <fo:table-row font-size="8pt"> - <fo:table-cell number-rows-spanned="2" border-right-width="0.5pt" border-right-style="solid"> - <fo:block margin="2mm">Nr</fo:block> - </fo:table-cell> - <fo:table-cell number-rows-spanned="2" border-right-width="0.5pt" border-right-style="solid"> - <fo:block margin="2mm">Bezeichnung des Erkrankten</fo:block> - </fo:table-cell> - <fo:table-cell number-rows-spanned="2" border-right-width="0.5pt" border-right-style="solid"> - <fo:block margin="2mm">Datum</fo:block> - </fo:table-cell> - <fo:table-cell number-rows-spanned="2" border-right-width="0.5pt" border-right-style="solid"> - <fo:block margin="2mm">Art der Leistung</fo:block> - </fo:table-cell> - <fo:table-cell border-right-width="0.5pt" border-right-style="solid"> - <fo:block margin="2mm">Betrag</fo:block> - </fo:table-cell> - <fo:table-cell border-right-width="0.5pt" border-right-style="solid"> - <fo:block margin="2mm">Kostenerstattung von anderer Seite</fo:block> - </fo:table-cell> - <fo:table-cell number-rows-spanned="2"> - <fo:block padding="2mm">Unfallbedingt?</fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row> - <fo:table-cell border-right-width="0.5pt" border-right-style="solid"> - <fo:block>Euro</fo:block> + + <fo:table-row font-size="8pt"> + <fo:table-cell border-right-width="0.5pt" border-right-style="solid"> <!--A: Nr. --> + <fo:block margin="2mm">Be- leg- Nr.</fo:block> </fo:table-cell> - <fo:table-cell border-right-width="0.5pt" border-right-style="solid"> - <fo:block>Euro</fo:block> + + <fo:table-cell border-right-width="0.5pt" border-right-style="solid"> <!--B: Bez. Erkrankter --> + <fo:block margin="2mm">Bezeichnung des Erkrankten</fo:block> + </fo:table-cell> + + <fo:table-cell border-right-width="0.5pt" border-right-style="solid"> <!-- C: Datum --> + <fo:block margin="2mm">Datum der Rechnung, des Rezepts</fo:block> + </fo:table-cell> + + <fo:table-cell border-right-width="0.5pt" border-right-style="solid"> <!-- D: Betrag --> + <fo:block margin="2mm">Rechnungsbetrag in Euro/Cent</fo:block> + </fo:table-cell> + + <fo:table-cell border-right-width="0.5pt" border-right-style="solid"> <!-- E: Kostenerstattung andere --> + <fo:block margin="2mm">Kostenerstattung von anderer Seite in Euro/Cent</fo:block> + </fo:table-cell> + + <fo:table-cell border-right-width="0.5pt" border-right-style="solid"> <!-- F: Unfallbedingt? --> + <fo:block padding="2mm">Unfallbedingte Aufwendungen, Datum des Unfalls</fo:block> </fo:table-cell> - </fo:table-row> - + <fo:table-cell> <!-- G: Angehörige? --> + <fo:block padding="2mm">Behandlung d. nahe Angehörige?</fo:block> + </fo:table-cell> + </fo:table-row> + <xsl:apply-templates select="kk:berechtigte"/> - + <fo:table-row> <fo:table-cell - number-columns-spanned="4" + number-columns-spanned="3" border-top-width=".5pt" border-top-style="solid" - border-right-width="0.5pt" border-right-style="solid"> - <fo:block font-weight="bold" margin-right="1mm" text-align="end">Summe</fo:block> + border-right-width="0.5pt" border-right-style="solid"> <!-- Spalten A bis C--> + <fo:block font-weight="bold" margin-right="1mm">Gesamtsumme Rechnungsbeträge</fo:block> </fo:table-cell> - - - - <fo:table-cell - border-top-width=".5pt" border-top-style="solid" - border-right-width="0.5pt" border-right-style="solid"> - <fo:block font-weight="bold" margin-right="1mm" text-align="end"> - <xsl:value-of select="format-number(sum(kk:verordnungen/kk:verordnung/@betrag),'.00')"/> - </fo:block> - </fo:table-cell> - + <fo:table-cell border-top-width=".5pt" border-top-style="solid" - border-right-width="0.5pt" border-right-style="solid"> + border-right-width="0.5pt" border-right-style="solid"> <!-- Spalte D --> <fo:block font-weight="bold" margin-right="1mm" text-align="end"> - <xsl:value-of select="format-number(0.01 * sum(kk:verordnungen/kk:verordnung/(@betrag * (100 - key('berechtigterZuId', @ref)/@beihilfe))),'.00')"/> + <xsl:value-of select="format-number(sum(kk:verordnungen/kk:verordnung/@betrag), '#,00', 'de')"/> </fo:block> </fo:table-cell> - - <fo:table-cell - border-top-width=".5pt" border-top-style="solid"> + + <fo:table-cell number-columns-spanned="3" + border-top-width=".5pt" border-top-style="solid"> <!-- Spalten e bis G --> <fo:block/> </fo:table-cell> - + </fo:table-row> </fo:table-body> </fo:table> - + </xsl:template> - + <xsl:template match="kk:berechtigte"> + <xsl:for-each select="*"> - <xsl:variable name="verord" select="key('verordnungByBerechtigter', @id)"></xsl:variable> - <xsl:variable name="fremdErstattung" select="(100 - @beihilfe) div 100."/> - <xsl:variable name="pTyp"> - <xsl:apply-templates select="." mode="personentyp"/> - </xsl:variable> - <xsl:for-each select="$verord"> - <fo:table-row> - <fo:table-cell border-top=".5pt solid black" border-right=".5pt solid black"> + <xsl:variable name="verord" select="key('verordnungByBerechtigter', @id)"/> + <xsl:variable name="fremdErstattung" select="(100 - @beihilfe) div 100."/> + <xsl:variable name="pTyp"> + <xsl:apply-templates select="." mode="personentyp"/> + </xsl:variable> + <xsl:for-each select="$verord"> + <fo:table-row height="8mm"> + <fo:table-cell text-align="center" border-top=".5pt solid black" border-right=".5pt solid black"> <!-- Spalte A --> <fo:block> <xsl:value-of select="@nr"/> </fo:block> - </fo:table-cell> - <fo:table-cell border-top=".5pt solid black" border-right=".5pt solid black"> + </fo:table-cell> + + <fo:table-cell border-top=".5pt solid black" border-right=".5pt solid black"> <!-- Spalte B --> <fo:block> <xsl:value-of select="$pTyp"/> </fo:block> </fo:table-cell> - <fo:table-cell border-top=".5pt solid black" border-right=".5pt solid black"> + + <fo:table-cell border-top=".5pt solid black" border-right=".5pt solid black"> <!-- Spalte C --> <fo:block> <xsl:value-of select="@datum"/> </fo:block> </fo:table-cell> - <fo:table-cell border-top=".5pt solid black" border-right=".5pt solid black"> + + <fo:table-cell border-top=".5pt solid black" border-right=".5pt solid black"> <!-- Spalte D --> <fo:block> - <xsl:call-template name="behandlungsart"> - <xsl:with-param name="typ" select="@typ"/> - </xsl:call-template> + <fo:block text-align="end"> + <xsl:value-of select="format-number(@betrag, '#,00', 'de')"/> + </fo:block> </fo:block> </fo:table-cell> - <fo:table-cell border-top=".5pt solid black" border-right=".5pt solid black"> - <fo:block text-align="end"> - <xsl:value-of select="@betrag"/> - </fo:block> - </fo:table-cell> - <fo:table-cell border-top=".5pt solid black" border-right=".5pt solid black"> + + + <fo:table-cell border-top=".5pt solid black" border-right=".5pt solid black"> <!-- Spalte E --> <fo:block text-align="end"> - <xsl:value-of select="format-number(@betrag * $fremdErstattung, '.00')"/> + <xsl:value-of select="format-number(@betrag * $fremdErstattung, '#,00', 'de')"/> </fo:block> </fo:table-cell> - <fo:table-cell border-top=".5pt solid black" border-right=".5pt solid black"> - <fo:block text-align="end"> + + <fo:table-cell border-top=".5pt solid black" border-right=".5pt solid black"> <!-- Spalte F --> + <fo:block text-align="center"> <xsl:choose> <xsl:when test="@unfall"> - <xsl:text>Siehe </xsl:text> + <!-- Strange: id(@unfall) geht nicht! --> - <xsl:apply-templates select="key('unfallById', @unfall)" mode="nr" /> + <xsl:apply-templates select="key('unfallById', @unfall)" mode="datum" /> </xsl:when> <xsl:otherwise>-</xsl:otherwise> </xsl:choose> </fo:block> </fo:table-cell> - </fo:table-row> - </xsl:for-each> + + <fo:table-cell border-top=".5pt solid black" border-right=".5pt solid black"> <!-- Spalte G --> + <fo:block text-align="center"> + <xsl:text>-</xsl:text> + </fo:block> + </fo:table-cell> + + </fo:table-row> + </xsl:for-each> </xsl:for-each> </xsl:template> - - + <xsl:template match="kk:antragsteller" mode="personentyp">A</xsl:template> - + <xsl:template match="kk:ehepartner" mode="personentyp">E</xsl:template> - + <xsl:template match="kk:kind" mode="personentyp"> <xsl:value-of select="kk:name"/> </xsl:template> - + </xsl:stylesheet> -- GitLab