commit 9aa2a4ab43ef36bc672e54dd82964ce5fb0dd738
Author: Marei Peischl <marei@peitex.de>
Date:   Thu Sep 17 15:03:04 2020 +0200

    marei: comment generated line endings

diff --git a/templates/print/marei/bin_list.tex b/templates/print/marei/bin_list.tex
index 83c899b8b..3e99d6afd 100644
--- a/templates/print/marei/bin_list.tex
+++ b/templates/print/marei/bin_list.tex
@@ -28,13 +28,13 @@
 
 \parbox{\textwidth}{
   \parbox[b]{.42\textwidth}{%
-    <%company%>
+    <%company%>%
 
-    <%address%>
+    <%address%>%
   }\hfill
   \begin{tabular}[b]{rr@{}}
   Tel & <%tel%>\\
-  Fax & <%fax%>
+  Fax & <%fax%>%
   \end{tabular}
 
   \rule[1.5ex]{\textwidth}{0.5pt}
@@ -51,7 +51,7 @@
 <%street%> \\
 <%zipcode%> \\
 <%city%> \\
-<%country%>
+<%country%>%
 }
 \parbox[t]{.4\textwidth}{
 \textbf{Lieferanschrift}
@@ -61,7 +61,7 @@
 <%shiptostreet%> \\
 <%shiptozipcode%> \\
 <%shiptocity%> \\
-<%shiptocountry%>
+<%shiptocountry%>%
 }
 \hfill
 
@@ -74,23 +74,23 @@
 
 \begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
   \textbf{BestellNr. \#} & \textbf{Datum} & \textbf{Kontakt}
-  <%if warehouse%>
+  <%if warehouse%>%
   & \textbf{Lager}
-  <%end warehouse%>
+  <%end warehouse%>%
   & \textbf{Lagerplatz} & \textbf{Lieferung mit} \\ [0.5em]
   \hline
 
-  <%ordnumber%>
-  <%if shippingdate%>
-  & <%shippingdate%>
-  <%end shippingdate%>
-  <%if not shippingdate%>
-  & <%orddate%>
-  <%end shippingdate%>
-  & <%employee%>
-  <%if warehouse%>
-  & <%warehouse%>
-  <%end warehouse%>
+  <%ordnumber%>%
+  <%if shippingdate%>%
+  & <%shippingdate%>%
+  <%end shippingdate%>%
+  <%if not shippingdate%>%
+  & <%orddate%>%
+  <%end shippingdate%>%
+  & <%employee%>%
+  <%if warehouse%>%
+  & <%warehouse%>%
+  <%end warehouse%>%
   & <%shippingpoint%> & <%shipvia%> \\
   \hline
 \end{tabularx}
@@ -100,10 +100,10 @@
 \begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
   \textbf{Pos} & \textbf{Nummer} & \textbf{Beschreibung} & \textbf{Seriennumner} & & \textbf{Menge} & \textbf{Erh} & & \textbf{Lagerplatz} \\
 
-<%foreach number%>
+<%foreach number%>%
   <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
   <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
-<%end number%>
+<%end number%>%
 \end{tabularx}
 
 
diff --git a/templates/print/marei/check.tex b/templates/print/marei/check.tex
index 6086d457d..86ba76eb9 100644
--- a/templates/print/marei/check.tex
+++ b/templates/print/marei/check.tex
@@ -21,7 +21,7 @@
 \fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
 
 \parbox[t]{12cm}{
-  <%company%>
+  <%company%>%
 
   <%address%>}
 \hfill
@@ -33,36 +33,36 @@
 
 \vspace{0.5cm}
 
-\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>%
 
 \vspace{0.5cm}
 
-<%name%>
+<%name%>%
 
-<%street%>
+<%street%>%
 
-<%zipcode%>
+<%zipcode%>%
 
-<%city%>
+<%city%>%
 
-<%country%>
+<%country%>%
 
 \vspace{2.8cm}
 
-<%company%>
+<%company%>%
 
 \vspace{0.5cm}
 
-<%name%> \hfill <%datepaid%> \hfill <%source%>
+<%name%> \hfill <%datepaid%> \hfill <%source%>%
 
 \vspace{0.5cm}
 \begin{tabularx}{\textwidth}{lXrr@{}}
 \textbf{Rechnung} & \textbf{Ausgestellt}
   & \textbf{Fällig} & \textbf{Verrechnet} \\
-<%foreach invnumber%>
+<%foreach invnumber%>%
 <%invnumber%> & <%invdate%> \dotfill
   & <%due%> & <%paid%> \\
-<%end invnumber%>
+<%end invnumber%>%
 \end{tabularx}
 
 \vfill
diff --git a/templates/print/marei/credit_note.tex b/templates/print/marei/credit_note.tex
index ea84e00e3..f8744bbe0 100644
--- a/templates/print/marei/credit_note.tex
+++ b/templates/print/marei/credit_note.tex
@@ -19,7 +19,7 @@
 \begin{document}
 	
 
-<%if shiptoname%>
+<%if shiptoname%>%
 \makeatletter
 \begin{lrbox}\shippingAddressBox
 	\parbox{\useplength{toaddrwidth}}{
@@ -35,22 +35,22 @@
 		<%shiptodepartment_1%>\par
 		<%shiptodepartment_2%>\par
 		<%shiptostreet%>\par
-		<%shiptozipcode%> <%shiptocity%>
+		<%shiptozipcode%> <%shiptocity%>%
 	}
 \end{lrbox}
 \makeatother
-<%end if%>
+<%end if%>%
 
 	
 \setkomavar{title}{
 	\gutschrift~
-	\nr ~<%invnumber%>
+	\nr ~<%invnumber%>%
 }
 
-<%if invnumber_for_credit_note%>
+<%if invnumber_for_credit_note%>%
 \setkomavar*{myref}{\fuerRechnung}
 \setkomavar{myref}{<%invnumber_for_credit_note%>}
-<%end if%>
+<%end if%>%
 
 \setkomavar*{date}{\datum}
 
@@ -62,8 +62,8 @@
 	
 \begin{letter}{
 		<%name%>\strut\\
-		<%if department_1%><%department_1%>\\<%end if%>
-		<%if department_2%><%department_2%>\\<%end if%>
+		<%if department_1%><%department_1%>\\<%end if%>%
+		<%if department_2%><%department_2%>\\<%end if%>%
 		<%cp_givenname%> <%cp_name%>\strut\\
 		<%street%>\strut\\
 		<%zipcode%> <%city%>\strut\\
@@ -103,22 +103,22 @@
 		<%sellprice%>&%
 		\ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
 			<%linetotal%>\tabularnewline
-			<%end number%>
+			<%end number%>%
 	}
 	\begin{PricingTotal}
 		% Tabellenende letzte Seite
 		\nettobetrag & <%subtotal%>\\
-		<%foreach tax%>
+		<%foreach tax%>%
 		<%taxdescription%> & <%tax%>\\
-		<%end tax%>
+		<%end tax%>%
 		\bfseries\schlussbetrag &  \bfseries <%ordtotal%>\\
 	\end{PricingTotal}
 \end{PricingTabular*}
 
-<%if notes%>
-<%notes%>
+<%if notes%>%
+<%notes%>%
 \medskip
-<%end if%>
+<%end if%>%
 
 \closing{\gruesse}
 
diff --git a/templates/print/marei/invoice.tex b/templates/print/marei/invoice.tex
index 7de5864e9..a4d990377 100644
--- a/templates/print/marei/invoice.tex
+++ b/templates/print/marei/invoice.tex
@@ -24,24 +24,24 @@
 \setkomavar{fromphone}{<%employee_tel%>}
 \setkomavar{fromemail}{<%employee_email%>}
 \setkomavar{title}{
-	\rechnung~ \nr ~<%invnumber%>
+	\rechnung~ \nr ~<%invnumber%>%
 }
-<%if ordnumber%>
+<%if ordnumber%>%
 \setkomavar*{myref}{\auftragsnummer}
 \setkomavar{myref}{<%ordnumber%>}
-<%end if%>
-<%if cusordnumber%>
+<%end if%>%
+<%if cusordnumber%>%
 \setkomavar*{yourref}{\ihreBestellnummer}
 \setkomavar{yourref}{<%cusordnumber%>}
-<%end if%>
-<%if donumber%>
+<%end if%>%
+<%if donumber%>%
   \setkomavar{delivery}{<%donumber%>}
-<%end if%>
-<%if quonumber%>
+<%end if%>%
+<%if quonumber%>%
 \setkomavar{quote}{<%quonumber%>}
-<%end if%>
+<%end if%>%
 
-<%if shiptoname%>
+<%if shiptoname%>%
 \makeatletter
 \begin{lrbox}\shippingAddressBox
 	\parbox{\useplength{toaddrwidth}}{
@@ -57,18 +57,18 @@
 		<%shiptodepartment_1%>\par
 		<%shiptodepartment_2%>\par
 		<%shiptostreet%>\par
-		<%shiptozipcode%> <%shiptocity%>
+		<%shiptozipcode%> <%shiptocity%>%
 	}
 \end{lrbox}
 \makeatother
-<%end if%>
+<%end if%>%
 
 \begin{document}
 
 \begin{letter}{
 		<%name%>\strut\\
-		<%if department_1%><%department_1%>\\<%end if%>
-		<%if department_2%><%department_2%>\\<%end if%>
+		<%if department_1%><%department_1%>\\<%end if%>%
+		<%if department_2%><%department_2%>\\<%end if%>%
 		<%cp_givenname%> <%cp_name%>\strut\\
 		<%street%>\strut\\
 		<%zipcode%> <%city%>\strut\\
@@ -89,10 +89,10 @@
 		}
 \thispagestyle{kivitendo.letter.first}
 
-<%if notes%>
-        <%notes%>
+<%if notes%>%
+        <%notes%>%
         \vspace{0.5cm}
-<%end if%>
+<%end if%>%
 
 
 %PricingTabular* kann automatisch spalten ignorieren
@@ -121,9 +121,9 @@
 \begin{PricingTotal}
 % Tabellenende letzte Seite
 \nettobetrag & <%subtotal%>\\
-<%foreach tax%>
+<%foreach tax%>%
 <%taxdescription%> & <%tax%>\\
-<%end tax%>
+<%end tax%>%
 \bfseries\schlussbetrag &  \bfseries <%invtotal%>\\
 \end{PricingTotal}
 \end{PricingTabular*}
@@ -136,15 +136,15 @@
 	\lieferungErfolgtAm ~<%deliverydate%>.
 }\\
 
-<%if payment_terms%>
+<%if payment_terms%>%
   \zahlung ~<%payment_terms%>\\
-<%end payment_terms%>
+<%end payment_terms%>%
 
-<%if delivery_term%>
+<%if delivery_term%>%
   \lieferung ~<%delivery_term.description_long%>\\
-<%end delivery_term%>
+<%end delivery_term%>%
 
-<%if ustid%>\ihreustid ~<%ustid%>.\\<%end if%>
+<%if ustid%>\ihreustid ~<%ustid%>.\\<%end if%>%
 
 \ifnum<%taxzone_id%>=1
     \steuerfreiEU\\  % EU mit USt-ID Nummer
diff --git a/templates/print/marei/pick_list.tex b/templates/print/marei/pick_list.tex
index 800c63ff1..8268b1470 100644
--- a/templates/print/marei/pick_list.tex
+++ b/templates/print/marei/pick_list.tex
@@ -29,13 +29,13 @@
 
 \parbox{\textwidth}{
   \parbox[b]{.42\textwidth}{
-    <%company%>
+    <%company%>%
 
-    <%address%>
+    <%address%>%
   }\hfill
   \begin{tabular}[b]{rr@{}}
   Tel & <%tel%>\\
-  Fax & <%fax%>
+  Fax & <%fax%>%
   \end{tabular}
 
   \rule[1.5ex]{\textwidth}{0.5pt}
@@ -57,20 +57,20 @@
 <%shiptostreet%> \\
 <%shiptozipcode%> \\
 <%shiptocity%> \\
-<%shiptocountry%>
+<%shiptocountry%>%
 }
 \parbox[t]{.4\textwidth}{
-  <%shiptocontact%>
+  <%shiptocontact%>%
 
-  <%if shiptophone%>
-  Tel: <%shiptophone%>
-  <%end shiptophone%>
+  <%if shiptophone%>%
+  Tel: <%shiptophone%>%
+  <%end shiptophone%>%
 
-  <%if shiptofax%>
-  Fax: <%shiptofax%>
-  <%end shiptofax%>
+  <%if shiptofax%>%
+  Fax: <%shiptofax%>%
+  <%end shiptofax%>%
 
-  <%shiptoemail%>
+  <%shiptoemail%>%
 }
 \hfill
 
@@ -83,22 +83,22 @@
 
 \begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
   \textbf{BestellNr. \#} & \textbf{Datum} & \textbf{Kontakt}
-  <%if warehouse%>
+  <%if warehouse%>%
   & \textbf{Lager}
-  <%end warehouse%>
+  <%end warehouse%>%
   & \textbf{Lagerplatz} & \textbf{Lieferung mit} \\ [0.5em]
   \hline
-  <%ordnumber%>
-  <%if shippingdate%>
-  & <%shippingdate%>
-  <%end shippingdate%>
-  <%if not shippingdate%>
-  & <%orddate%>
-  <%end shippingdate%>
-  & <%employee%>
-  <%if warehouse%>
-  & <%warehouse%>
-  <%end warehouse%>
+  <%ordnumber%>%
+  <%if shippingdate%>%
+  & <%shippingdate%>%
+  <%end shippingdate%>%
+  <%if not shippingdate%>%
+  & <%orddate%>%
+  <%end shippingdate%>%
+  & <%employee%>%
+  <%if warehouse%>%
+  & <%warehouse%>%
+  <%end warehouse%>%
   & <%shippingpoint%> & <%shipvia%> \\
   \hline
 \end{tabularx}
@@ -108,10 +108,10 @@
 \begin{tabular*}{\textwidth}{@{}rlp{\descrwidth}@{\extracolsep\fill}rcll@{}}
   \textbf{Pos} & \textbf{Nummer} & \textbf{Beschreibung} &
   \textbf{Menge} & \textbf{Lagerausgang} & & \textbf{Lagerplatz} \\
-<%foreach number%>
+<%foreach number%>%
   <%runningnumber%> & <%number%> & <%description%> &
   <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
-<%end number%>
+<%end number%>%
 \end{tabular*}
 
 
diff --git a/templates/print/marei/proforma.tex b/templates/print/marei/proforma.tex
index d591fc41c..4151dc6ea 100644
--- a/templates/print/marei/proforma.tex
+++ b/templates/print/marei/proforma.tex
@@ -20,23 +20,23 @@
 	
 \setkomavar{title}{
 	\proformarechnung~
-	\nr ~<%ordnumber%>
+	\nr ~<%ordnumber%>%
 }
 \setkomavar*{date}{\datum}
 
 \setkomavar{date}{<%orddate%>}
 \setkomavar{customer}{<%customernumber%>}
-<%if cusordnumber%>
+<%if cusordnumber%>%
 	\setkomavar*{yourref}{\ihreBestellnummer}
 	\setkomavar{yourref}{<%cusordnumber%>}
-<%end if%>
-<%if quonumber%>\setkomavar{quote}{<%quonumber%>}<%end if%>
+<%end if%>%
+<%if quonumber%>\setkomavar{quote}{<%quonumber%>}<%end if%>%
 \setkomavar{fromname}{<%employee_name%>}
 \setkomavar{fromphone}{<%employee_tel%>}
 \setkomavar{fromemail}{<%employee_email%>}
 \setkomavar{transaction}{<%transaction_description%>}
 	
-<%if shiptoname%>
+<%if shiptoname%>%
 \makeatletter
 \begin{lrbox}\shippingAddressBox
 	\parbox{\useplength{toaddrwidth}}{
@@ -52,16 +52,16 @@
 		<%shiptodepartment_1%>\par
 		<%shiptodepartment_2%>\par
 		<%shiptostreet%>\par
-		<%shiptozipcode%> <%shiptocity%>
+		<%shiptozipcode%> <%shiptocity%>%
 	}
 \end{lrbox}
 \makeatother
-<%end if%>
+<%end if%>%
 
 \begin{letter}{
 		<%name%>\strut\\
-		<%if department_1%><%department_1%>\\<%end if%>
-		<%if department_2%><%department_2%>\\<%end if%>
+		<%if department_1%><%department_1%>\\<%end if%>%
+		<%if department_2%><%department_2%>\\<%end if%>%
 		<%cp_givenname%> <%cp_name%>\strut\\
 		<%street%>\strut\\
 		<%zipcode%> <%city%>\strut\\
@@ -91,7 +91,7 @@
 	<%number%> &%
 	\textbf{<%description%>}%
 	<%if longdescription%>\ExtraDescription{<%longdescription%>}<%end longdescription%>%
-    <%if reqdate%>\ExtraDescription{\lieferdatum: <%reqdate%>}<%end reqdate%>
+    <%if reqdate%>\ExtraDescription{\lieferdatum: <%reqdate%>}<%end reqdate%>%
 	<%if serialnumber%>\ExtraDescription{\seriennummer: <%serialnumber%>}<%end serialnumber%>%
 	<%if ean%>\ExtraDescription{\ean: <%ean%>}<%end ean%>%
 	<%if projectnumber%>\ExtraDescription{\projektnummer: <%projectnumber%>}<%end projectnumber%>%
@@ -100,27 +100,27 @@
 	<%sellprice%>&%
 	\ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
 	<%linetotal%>\tabularnewline
-	<%end number%>
+	<%end number%>%
 }
 % Tabellenende letzte Seite
 	\begin{PricingTotal}
 	% Tabellenende letzte Seite
 	\nettobetrag & <%subtotal%>\\
-	<%foreach tax%>
+	<%foreach tax%>%
 	<%taxdescription%> & <%tax%>\\
-	<%end tax%>
+	<%end tax%>%
 	\bfseries\schlussbetrag &  \bfseries <%ordtotal%>\\
 \end{PricingTotal}
 \end{PricingTabular*}
 
-<%if notes%>
-<%notes%>
+<%if notes%>%
+<%notes%>%
 \medskip
-<%end if%>
+<%end if%>%
 
-<%if reqdate%>
+<%if reqdate%>%
 \lieferungErfolgtAm ~<%reqdate%>. \\
-<%end if%>
+<%end if%>%
 
 \textit{\auftragpruefen}
 
diff --git a/templates/print/marei/purchase_delivery_order.tex b/templates/print/marei/purchase_delivery_order.tex
index 39e861dcc..4d370da1e 100644
--- a/templates/print/marei/purchase_delivery_order.tex
+++ b/templates/print/marei/purchase_delivery_order.tex
@@ -26,54 +26,54 @@
 
   \vspace*{0.3cm}
 
-  <%name%>
+  <%name%>%
 
-  <%if department_1%><%department_1%><%end if%>
+  <%if department_1%><%department_1%><%end if%>%
 
-  <%if department_2%><%department_2%><%end if%>
+  <%if department_2%><%department_2%><%end if%>%
 
-  <%cp_givenname%> <%cp_name%>
+  <%cp_givenname%> <%cp_name%>%
 
-  <%street%>
+  <%street%>%
 
   ~
 
-  <%zipcode%> <%city%>
+  <%zipcode%> <%city%>%
 
-  <%country%>
+  <%country%>%
 \end{minipage}
 \hfill
 \begin{minipage}{6cm}
   \rightline{\LARGE\textbf{\textit{\einkaufslieferschein}}} \vspace*{0.2cm}
-  \rightline{\large\textbf{\textit{\nr ~<%donumber%>
+  \rightline{\large\textbf{\textit{\nr ~<%donumber%>%
   }}} \vspace*{0.2cm}
 
-  \datum:\hfill <%dodate%>
+  \datum:\hfill <%dodate%>%
 
-  <%if cusordnumber%>\unsereBestellnummer:\hfill <%cusordnumber%><%end if%>
+  <%if cusordnumber%>\unsereBestellnummer:\hfill <%cusordnumber%><%end if%>%
 
-  <%if ordnumber%>\auftragsnummer:\hfill <%ordnumber%><%end if%>
+  <%if ordnumber%>\auftragsnummer:\hfill <%ordnumber%><%end if%>%
 
-  \ansprechpartner:\hfill <%employee_name%>
+  \ansprechpartner:\hfill <%employee_name%>%
 
-  <%if globalprojectnumber%> \projektnummer:\hfill <%globalprojectnumber%> <%end globalprojectnumber%>
+  <%if globalprojectnumber%> \projektnummer:\hfill <%globalprojectnumber%> <%end globalprojectnumber%>%
 \end{minipage}
 
-<%if shiptoname%>
+<%if shiptoname%>%
   \vspace{0.8cm}
   \scriptsize \underline{\abweichendeLieferadresse:}\\
-  \normalsize    <%shiptoname%>
+  \normalsize    <%shiptoname%>%
 
-                 <%if shiptocontact%> <%shiptocontact%><%end if%>
+                 <%if shiptocontact%> <%shiptocontact%><%end if%>%
 
-                 <%shiptodepartment_1%>
+                 <%shiptodepartment_1%>%
 
-                  <%shiptodepartment_2%>
+                  <%shiptodepartment_2%>%
 
-                  <%shiptostreet%>
+                  <%shiptostreet%>%
 
-                  <%shiptozipcode%> <%shiptocity%>
-<%end if%>
+                  <%shiptozipcode%> <%shiptocity%>%
+<%end if%>%
 \vspace*{1.5cm}
 
 
@@ -87,32 +87,32 @@
 %
 \begin{SimpleTabular}
 % eigentliche Tabelle
-<%foreach number%>
+<%foreach number%>%
           <%runningnumber%> &
           <%qty%> <%unit%> &
           \textbf{<%description%>} \\*  % kein Umbruch nach der ersten Zeile, damit Beschreibung und Langtext nicht getrennt werden
 
-          <%if longdescription%> && \scriptsize <%longdescription%>\\<%end longdescription%>
-          <%if projectnumber%> && \scriptsize \projektnummer: <%projectnumber%>\\<%end projectnumber%>
-          <%if reqdate%> && \scriptsize \lieferdatum: <%reqdate%>\\<%end reqdate%>
-          <%if serialnumber%> && \scriptsize \seriennummer: <%serialnumber%>\\<%end serialnumber%>
-          <%if ean%> && \scriptsize \ean: <%ean%>\\<%end ean%>
-          <%foreach si_number%><%if si_chargenumber%> && \scriptsize \charge: <%si_chargenumber%> <%if si_bestbefore%> \mhd: <%si_bestbefore%><%end if%> <%si_qty%>~<%si_unit%><%end si_chargenumber%>\\<%end si_number%>
+          <%if longdescription%> && \scriptsize <%longdescription%>\\<%end longdescription%>%
+          <%if projectnumber%> && \scriptsize \projektnummer: <%projectnumber%>\\<%end projectnumber%>%
+          <%if reqdate%> && \scriptsize \lieferdatum: <%reqdate%>\\<%end reqdate%>%
+          <%if serialnumber%> && \scriptsize \seriennummer: <%serialnumber%>\\<%end serialnumber%>%
+          <%if ean%> && \scriptsize \ean: <%ean%>\\<%end ean%>%
+          <%foreach si_number%><%if si_chargenumber%> && \scriptsize \charge: <%si_chargenumber%> <%if si_bestbefore%> \mhd: <%si_bestbefore%><%end if%> <%si_qty%>~<%si_unit%><%end si_chargenumber%>\\<%end si_number%>%
 
           \\[-0.8em]
-<%end number%>
+<%end number%>%
 \end{SimpleTabular}
 
 \vspace{0.2cm}
 
-<%if notes%>
+<%if notes%>%
         \vspace{5mm}
-        <%notes%>
+        <%notes%>%
         \vspace{5mm}
-<%end if%>
+<%end if%>%
 
-<%if delivery_term%>
+<%if delivery_term%>%
   \lieferung ~<%delivery_term.description_long%>\\
-<%end delivery_term%>
+<%end delivery_term%>%
 
 \end{document}
diff --git a/templates/print/marei/purchase_order.tex b/templates/print/marei/purchase_order.tex
index e4c4b691b..d04ff3196 100644
--- a/templates/print/marei/purchase_order.tex
+++ b/templates/print/marei/purchase_order.tex
@@ -20,21 +20,21 @@
 
 \setkomavar{title}{
 	\bestellung~
-	\nr~<%ordnumber%>
+	\nr~<%ordnumber%>%
 }
 \setkomavar*{date}{\datum}
 \setkomavar{date}{<%orddate%>}
-<%if cusordnumber%>
+<%if cusordnumber%>%
 \setkomavar*{yourref}{\unsereBestellnummer}
 \setkomavar{yourref}{<%cusordnumber%>}
-<%end if%>
-<%if quonumber%>\setkomavar{quote}{<%quonumber%>}<%end if%>
+<%end if%>%
+<%if quonumber%>\setkomavar{quote}{<%quonumber%>}<%end if%>%
 \setkomavar{fromname}{<%employee_name%>}
 \setkomavar{fromphone}{<%employee_tel%>}
 \setkomavar{fromemail}{<%employee_email%>}
 \setkomavar{transaction}{<%transaction_description%>}
 
-<%if shiptoname%>
+<%if shiptoname%>%
 \makeatletter
 \begin{lrbox}\shippingAddressBox
 	\parbox{\useplength{toaddrwidth}}{
@@ -50,17 +50,17 @@
 		<%shiptodepartment_1%>\par
 		<%shiptodepartment_2%>\par
 		<%shiptostreet%>\par
-		<%shiptozipcode%> <%shiptocity%>
+		<%shiptozipcode%> <%shiptocity%>%
 	}
 \end{lrbox}
 \makeatother
-<%end if%>
+<%end if%>%
 
 
 \begin{letter}{
 		<%name%>\strut\\
-		<%if department_1%><%department_1%>\\<%end if%>
-		<%if department_2%><%department_2%>\\<%end if%>
+		<%if department_1%><%department_1%>\\<%end if%>%
+		<%if department_2%><%department_2%>\\<%end if%>%
 		<%cp_givenname%> <%cp_name%>\strut\\
 		<%street%>\strut\\
 		<%zipcode%> <%city%>\strut\\
@@ -100,26 +100,26 @@
 		<%sellprice%>&%
 		\ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
 		<%linetotal%>\tabularnewline
-		<%end number%>
+		<%end number%>%
 	}
 	\begin{PricingTotal}
 		% Tabellenende letzte Seite
 		\nettobetrag & <%subtotal%>\\
-		<%foreach tax%>
+		<%foreach tax%>%
 		<%taxdescription%> & <%tax%>\\
-		<%end tax%>
+		<%end tax%>%
 		\bfseries\schlussbetrag &  \bfseries <%ordtotal%>\\
 	\end{PricingTotal}
 \end{PricingTabular*}
 
-<%if notes%>
-<%notes%>
+<%if notes%>%
+<%notes%>%
 \medskip
-<%end if%>
+<%end if%>%
 
-<%if delivery_term%>
+<%if delivery_term%>%
   \lieferung ~<%delivery_term.description_long%>\\
-<%end delivery_term%>
+<%end delivery_term%>%
 
 \closing{\gruesse}
 \end{letter}
diff --git a/templates/print/marei/receipt.tex b/templates/print/marei/receipt.tex
index 6086d457d..86ba76eb9 100644
--- a/templates/print/marei/receipt.tex
+++ b/templates/print/marei/receipt.tex
@@ -21,7 +21,7 @@
 \fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
 
 \parbox[t]{12cm}{
-  <%company%>
+  <%company%>%
 
   <%address%>}
 \hfill
@@ -33,36 +33,36 @@
 
 \vspace{0.5cm}
 
-\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>%
 
 \vspace{0.5cm}
 
-<%name%>
+<%name%>%
 
-<%street%>
+<%street%>%
 
-<%zipcode%>
+<%zipcode%>%
 
-<%city%>
+<%city%>%
 
-<%country%>
+<%country%>%
 
 \vspace{2.8cm}
 
-<%company%>
+<%company%>%
 
 \vspace{0.5cm}
 
-<%name%> \hfill <%datepaid%> \hfill <%source%>
+<%name%> \hfill <%datepaid%> \hfill <%source%>%
 
 \vspace{0.5cm}
 \begin{tabularx}{\textwidth}{lXrr@{}}
 \textbf{Rechnung} & \textbf{Ausgestellt}
   & \textbf{Fällig} & \textbf{Verrechnet} \\
-<%foreach invnumber%>
+<%foreach invnumber%>%
 <%invnumber%> & <%invdate%> \dotfill
   & <%due%> & <%paid%> \\
-<%end invnumber%>
+<%end invnumber%>%
 \end{tabularx}
 
 \vfill
diff --git a/templates/print/marei/request_quotation.tex b/templates/print/marei/request_quotation.tex
index c7a514045..82e977971 100644
--- a/templates/print/marei/request_quotation.tex
+++ b/templates/print/marei/request_quotation.tex
@@ -26,17 +26,17 @@
 \setkomavar{fromemail}{<%employee_email%>}
 \setkomavar{title}{
 	\anfrage~
-	\nr ~<%quonumber%>
+	\nr ~<%quonumber%>%
 }
-<%if globalprojectnumber%>
+<%if globalprojectnumber%>%
 	\setkomavar{projectID}{<%globalprojectnumber%>}
-<%end globalprojectnumber%>
+<%end globalprojectnumber%>%
 \setkomavar{transaction}{<%transaction_description%>}
 
 \begin{letter}{
 		<%name%>\strut\\
-		<%if department_1%><%department_1%>\\<%end if%>
-		<%if department_2%><%department_2%>\\<%end if%>
+		<%if department_1%><%department_1%>\\<%end if%>%
+		<%if department_2%><%department_2%>\\<%end if%>%
 		<%cp_givenname%> <%cp_name%>\strut\\
 		<%street%>\strut\\
 		<%zipcode%> <%city%>\strut\\
@@ -93,37 +93,37 @@
 \endlastfoot
 
 % eigentliche Tabelle
-<%foreach number%>
+<%foreach number%>%
           <%runningnumber%> &
           <%qty%> <%unit%> &
           \textbf{<%description%>} \\*  % kein Umbruch nach der ersten Zeile, damit Beschreibung und Langtext nicht getrennt werden
 
-          <%if longdescription%> && \scriptsize <%longdescription%>\\<%end longdescription%>
-%          <%if projectnumber%> && \scriptsize \projektnummer: <%projectnumber%>\\<%end projectnumber%>
-          <%if make%>
-            <%foreach make%>
+          <%if longdescription%> && \scriptsize <%longdescription%>\\<%end longdescription%>%
+%          <%if projectnumber%> && \scriptsize \projektnummer: <%projectnumber%>\\<%end projectnumber%>%
+          <%if make%>%
+            <%foreach make%>%
               \ifstr{<%make%>}{<%name%>}{&& \artikelnummer: <%model%>\\}{}
-            <%end foreach%>
-          <%end if%>
+            <%end foreach%>%
+          <%end if%>%
 
           \\[-0.8em]
-<%end number%>
+<%end number%>%
 
 \end{longtable}
 
-<%if notes%>
-<%notes%>
+<%if notes%>%
+<%notes%>%
 \medskip
-<%end if%>
+<%end if%>%
 
 
-<%if delivery_term%>
+<%if delivery_term%>%
   \lieferung ~<%delivery_term.description_long%>\\
-<%end delivery_term%>
+<%end delivery_term%>%
 
-<%if reqdate%>
+<%if reqdate%>%
 \anfrageBenoetigtBis~<%reqdate%>.
-<%end if%>
+<%end if%>%
 
 \anfragedanke
 
diff --git a/templates/print/marei/sales_delivery_order.tex b/templates/print/marei/sales_delivery_order.tex
index c4879fdbe..61ecdf30c 100644
--- a/templates/print/marei/sales_delivery_order.tex
+++ b/templates/print/marei/sales_delivery_order.tex
@@ -20,21 +20,21 @@
 
 \setkomavar{title}{
 	\lieferschein~
-	\nr~<%donumber%>
+	\nr~<%donumber%>%
 }
 \setkomavar*{date}{\datum}
 \setkomavar{date}{<%dodate%>}
-<%if cusordnumber%>
+<%if cusordnumber%>%
 	\setkomavar*{yourref}{\unsereBestellnummer}
 	\setkomavar{yourref}{<%cusordnumber%>}
-<%end if%>
-<%if ordnumber%>\setkomavar{orderID}{<%ordnumber%>}<%end if%>
+<%end if%>%
+<%if ordnumber%>\setkomavar{orderID}{<%ordnumber%>}<%end if%>%
 \setkomavar{fromname}{<%employee_name%>}
 \setkomavar{fromphone}{<%employee_tel%>}
 \setkomavar{fromemail}{<%employee_email%>}
-<%if globalprojectnumber%>
+<%if globalprojectnumber%>%
   \setkomavar{projectID}{<%globalprojectnumber%>}
-<%end globalprojectnumber%>
+<%end globalprojectnumber%>%
 
 \setkomavar{transaction}{<%transaction_description%>}
 
@@ -42,8 +42,8 @@
 \begin{letter}{
   \ifstr{<%shiptoname%>}{}{ % KEINE ABWEICHENDE LIEFERADRESSE
 	<%name%>\strut\\
-	<%if department_1%><%department_1%>\\<%end if%>
-	<%if department_2%><%department_2%>\\<%end if%>
+	<%if department_1%><%department_1%>\\<%end if%>%
+	<%if department_2%><%department_2%>\\<%end if%>%
 	<%cp_givenname%> <%cp_name%>\strut\\
 	<%street%>\strut\\
 	<%zipcode%> <%city%>\strut\\
@@ -93,36 +93,36 @@
 \endlastfoot
 
 % eigentliche Tabelle
-<%foreach number%>
+<%foreach number%>%
           <%runningnumber%> &
           <%number%> &
           \textbf{<%description%>}&
           <%qty%> <%unit%> \\*  % kein Umbruch nach der ersten Zeile, damit Beschreibung und Langtext nicht getrennt werden
 
-          <%if longdescription%> && \scriptsize <%longdescription%>\\<%end longdescription%>
-          <%if reqdate%> && \scriptsize \lieferdatum: <%reqdate%>\\<%end reqdate%>
-          <%if serialnumber%> && \scriptsize \seriennummer: <%serialnumber%>\\<%end serialnumber%>
-          <%if ean%> && \scriptsize \ean: <%ean%>\\<%end ean%>
-          <%if projectnumber%> && \scriptsize \projektnummer: <%projectnumber%>\\<%end projectnumber%>
-          <%foreach si_number%><%if si_chargenumber%> && \scriptsize \charge: <%si_chargenumber%> <%if si_bestbefore%> \mhd: <%si_bestbefore%><%end if%> <%si_qty%>~<%si_unit%><%end si_chargenumber%>\\<%end si_number%>
+          <%if longdescription%> && \scriptsize <%longdescription%>\\<%end longdescription%>%
+          <%if reqdate%> && \scriptsize \lieferdatum: <%reqdate%>\\<%end reqdate%>%
+          <%if serialnumber%> && \scriptsize \seriennummer: <%serialnumber%>\\<%end serialnumber%>%
+          <%if ean%> && \scriptsize \ean: <%ean%>\\<%end ean%>%
+          <%if projectnumber%> && \scriptsize \projektnummer: <%projectnumber%>\\<%end projectnumber%>%
+          <%foreach si_number%><%if si_chargenumber%> && \scriptsize \charge: <%si_chargenumber%> <%if si_bestbefore%> \mhd: <%si_bestbefore%><%end if%> <%si_qty%>~<%si_unit%><%end si_chargenumber%>\\<%end si_number%>%
 
           \\[-0.8em]
-<%end number%>
+<%end number%>%
 
 \end{longtable}
 
 
 \vspace{0.2cm}
 
-<%if notes%>
-<%notes%>
+<%if notes%>%
+<%notes%>%
 \medskip
-<%end if%>
+<%end if%>%
 
 
-<%if delivery_term%>
+<%if delivery_term%>%
   \lieferung ~<%delivery_term.description_long%>\\
-<%end delivery_term%>
+<%end delivery_term%>%
 
 \end{letter}
 
diff --git a/templates/print/marei/sales_order.tex b/templates/print/marei/sales_order.tex
index 2d7ec4e3f..7eac6ae7c 100644
--- a/templates/print/marei/sales_order.tex
+++ b/templates/print/marei/sales_order.tex
@@ -19,15 +19,15 @@
 \begin{document}
 \setkomavar{title}{
 	\auftragsbestaetigung~
-	\nr~<%ordnumber%>
+	\nr~<%ordnumber%>%
 }
 \setkomavar*{date}{\datum}
 \setkomavar{date}{<%orddate%>}
-<%if cusordnumber%>
+<%if cusordnumber%>%
 \setkomavar*{yourref}{\ihreBestellnummer}
 \setkomavar{yourref}{<%cusordnumber%>}
-<%end if%>
-<%if quonumber%>\setkomavar{quote}{<%quonumber%>}<%end if%>
+<%end if%>%
+<%if quonumber%>\setkomavar{quote}{<%quonumber%>}<%end if%>%
 \setkomavar{customer}{<%customernumber%>}
 \setkomavar{fromname}{<%employee_name%>}
 \setkomavar{fromphone}{<%employee_tel%>}
@@ -36,7 +36,7 @@
 
 
 
-<%if shiptoname%>
+<%if shiptoname%>%
 \makeatletter
 \begin{lrbox}\shippingAddressBox
 	\parbox{\useplength{toaddrwidth}}{
@@ -52,16 +52,16 @@
 		<%shiptodepartment_1%>\par
 		<%shiptodepartment_2%>\par
 		<%shiptostreet%>\par
-		<%shiptozipcode%> <%shiptocity%>
+		<%shiptozipcode%> <%shiptocity%>%
 	}
 \end{lrbox}
 \makeatother
-<%end if%>
+<%end if%>%
 
 \begin{letter}{
 		<%name%>\strut\\
-		<%if department_1%><%department_1%>\\<%end if%>
-		<%if department_2%><%department_2%>\\<%end if%>
+		<%if department_1%><%department_1%>\\<%end if%>%
+		<%if department_2%><%department_2%>\\<%end if%>%
 		<%cp_givenname%> <%cp_name%>\strut\\
 		<%street%>\strut\\
 		<%zipcode%> <%city%>\strut\\
@@ -101,30 +101,30 @@
 		<%sellprice%>&%
 		\ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
 		<%linetotal%>\tabularnewline
-		<%end number%>
+		<%end number%>%
 	}
 	\begin{PricingTotal}
 		% Tabellenende letzte Seite
 		\nettobetrag & <%subtotal%>\\
-		<%foreach tax%>
+		<%foreach tax%>%
 		<%taxdescription%> & <%tax%>\\
-		<%end tax%>
+		<%end tax%>%
 		\bfseries\schlussbetrag &  \bfseries <%ordtotal%>\\
 	\end{PricingTotal}
 \end{PricingTabular*}
 
-<%if notes%>
-<%notes%>
+<%if notes%>%
+<%notes%>%
 \medskip
-<%end if%>
+<%end if%>%
 
-<%if delivery_term%>
+<%if delivery_term%>%
   \lieferung ~<%delivery_term.description_long%>\\
-<%end delivery_term%>
+<%end delivery_term%>%
 
-<%if reqdate%>
+<%if reqdate%>%
 \lieferungErfolgtAm ~<%reqdate%>.
-<%end if%>
+<%end if%>%
 
 \textit{\auftragpruefen}
 
diff --git a/templates/print/marei/sales_quotation.tex b/templates/print/marei/sales_quotation.tex
index bea5afdc9..75121bc70 100644
--- a/templates/print/marei/sales_quotation.tex
+++ b/templates/print/marei/sales_quotation.tex
@@ -33,12 +33,12 @@
 \setkomavar{fromemail}{<%employee_email%>}
 \setkomavar{title}{
 	\angebot~
-	<%quonumber%>
+	<%quonumber%>%
 }
 
 \setkomavar{transaction}{<%transaction_description%>}
 
-<%if shiptoname%>
+<%if shiptoname%>%
 \makeatletter
   \begin{lrbox}\shippingAddressBox
   \parbox{\useplength{toaddrwidth}}{
@@ -54,17 +54,17 @@
 	<%shiptodepartment_1%>\par
 	<%shiptodepartment_2%>\par
 	<%shiptostreet%>\par
-	<%shiptozipcode%> <%shiptocity%>
+	<%shiptozipcode%> <%shiptocity%>%
  }
 \end{lrbox}
 \makeatother
-<%end if%>
+<%end if%>%
 
 
 \begin{letter}{
   <%name%>\strut\\
-  <%if department_1%><%department_1%>\\<%end if%>
-  <%if department_2%><%department_2%>\\<%end if%>
+  <%if department_1%><%department_1%>\\<%end if%>%
+  <%if department_2%><%department_2%>\\<%end if%>%
   <%cp_givenname%> <%cp_name%>\strut\\
   <%street%>\strut\\
   <%zipcode%> <%city%>\strut\\
@@ -105,31 +105,31 @@
 	<%sellprice%>&%
 	\ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
 			<%linetotal%>\tabularnewline
-<%end number%>
+<%end number%>%
 }
 	\begin{PricingTotal}
 	% Tabellenende letzte Seite
 	\nettobetrag & <%subtotal%>\\
-	<%foreach tax%>
+	<%foreach tax%>%
 	<%taxdescription%> & <%tax%>\\
-	<%end tax%>
+	<%end tax%>%
 	\bfseries\schlussbetrag &  \bfseries <%ordtotal%>\\
 	\end{PricingTotal}
 \end{PricingTabular*}
 
-<%if notes%>
-  <%notes%>
+<%if notes%>%
+  <%notes%>%
   \medskip
-<%end if%>
+<%end if%>%
 
-<%if delivery_term%>
+<%if delivery_term%>%
   \lieferung ~<%delivery_term.description_long%>\\
-<%end delivery_term%>
+<%end delivery_term%>%
 
 \angebotdanke\\
-<%if reqdate%>
+<%if reqdate%>%
 \angebotgueltig~<%reqdate%>.
-<%end if%>
+<%end if%>%
 \angebotfragen
 
 
diff --git a/templates/print/marei/statement.tex b/templates/print/marei/statement.tex
index 16c05ebef..76c1944b7 100644
--- a/templates/print/marei/statement.tex
+++ b/templates/print/marei/statement.tex
@@ -20,7 +20,7 @@
 
 \setkomavar{title}{
 	\sammelrechnung~
-	\nr~<%quonumber%>
+	\nr~<%quonumber%>%
 }
 \setkomavar{transaction}{<%transaction_description%>}
 \setkomavar{customer}{<%customernumber%>}
@@ -31,8 +31,8 @@
 
 \begin{letter}{
 		<%name%>\strut\\
-		<%if department_1%><%department_1%>\\<%end if%>
-		<%if department_2%><%department_2%>\\<%end if%>
+		<%if department_1%><%department_1%>\\<%end if%>%
+		<%if department_2%><%department_2%>\\<%end if%>%
 		<%cp_givenname%> <%cp_name%>\strut\\
 		<%street%>\strut\\
 		<%zipcode%> <%city%>\strut\\
@@ -91,10 +91,10 @@
 \endlastfoot
 
 % eigentliche Tabelle
-<%foreach invnumber%>
+<%foreach invnumber%>%
           <%invnumber%> & <%invdate%> & <%duedate%> &
           <%c0%> & <%c30%> & <%c60%> & <%c90%> \\
-<%end invnumber%>
+<%end invnumber%>%
 
 \end{longtable}
 
diff --git a/templates/print/marei/zahlungserinnerung.tex b/templates/print/marei/zahlungserinnerung.tex
index 429989dee..0e49780f8 100644
--- a/templates/print/marei/zahlungserinnerung.tex
+++ b/templates/print/marei/zahlungserinnerung.tex
@@ -27,14 +27,14 @@
 \setkomavar{fromemail}{<%employee_email%>}
 \setkomavar{title}{
 	\mahnung
-	<%if dunning_id%>~\nr~<%dunning_id%><%end if%>
+	<%if dunning_id%>~\nr~<%dunning_id%><%end if%>%
 }
 \setkomavar{transaction}{<%transaction_description%>}
 
 \begin{letter}{
 		<%name%>\strut\\
-		<%if department_1%><%department_1%>\\<%end if%>
-		<%if department_2%><%department_2%>\\<%end if%>
+		<%if department_1%><%department_1%>\\<%end if%>%
+		<%if department_2%><%department_2%>\\<%end if%>%
 		<%cp_givenname%> <%cp_name%>\strut\\
 		<%street%>\strut\\
 		<%zipcode%> <%city%>\strut\\
@@ -59,9 +59,9 @@
 
 \begin{SimpleTabular}[\bfseries\rechnung~\nr&\bfseries\datum&\bfseries\betrag]
 % eigentliche Tabelle
-<%foreach dn_invnumber%>
+<%foreach dn_invnumber%>%
     <%dn_invnumber%> & <%dn_transdate%> & <%dn_amount%> \currency \\[0.1cm]
-<%end dn_invnumber%>
+<%end dn_invnumber%>%
 \end{SimpleTabular}
 
 \vspace{0.2cm}
diff --git a/templates/print/marei/zahlungserinnerung_invoice.tex b/templates/print/marei/zahlungserinnerung_invoice.tex
index 95468dd98..30bcce907 100644
--- a/templates/print/marei/zahlungserinnerung_invoice.tex
+++ b/templates/print/marei/zahlungserinnerung_invoice.tex
@@ -20,7 +20,7 @@
 
 \setkomavar{title}{
 	\rechnung~
-	\nr ~<%invnumber%>
+	\nr ~<%invnumber%>%
 }
 \setkomavar*{date}{\rechnungsdatum}
 \setkomavar{date}{<%invdate%>}
@@ -30,15 +30,15 @@
 \setkomavar{fromname}{<%employee_name%>}
 \setkomavar{fromphone}{<%employee_tel%>}
 \setkomavar{fromemail}{<%employee_email%>}
-<%if globalprojectnumber%>
+<%if globalprojectnumber%>%
 	\setkomavar{projectID}{<%globalprojectnumber%>}
-<%end globalprojectnumber%>
+<%end globalprojectnumber%>%
 \setkomavar{transaction}{<%transaction_description%>}
 
 \begin{letter}{
 		<%name%>\strut\\
-		<%if department_1%><%department_1%>\\<%end if%>
-		<%if department_2%><%department_2%>\\<%end if%>
+		<%if department_1%><%department_1%>\\<%end if%>%
+		<%if department_2%><%department_2%>\\<%end if%>%
 		<%cp_givenname%> <%cp_name%>\strut\\
 		<%street%>\strut\\
 		<%zipcode%> <%city%>\strut\\
