X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/4987cdc759332a4226006c34f3b7c78ee031bc62..53593baa211863fbf66540cf1bcc36c8fb37257f:/templates/print/marei/zahlungserinnerung.tex

diff --git a/templates/print/marei/zahlungserinnerung.tex b/templates/print/marei/zahlungserinnerung.tex
index 1f4580dce..abb601f78 100644
--- a/templates/print/marei/zahlungserinnerung.tex
+++ b/templates/print/marei/zahlungserinnerung.tex
@@ -15,55 +15,55 @@
 % laufende Kopfzeile:
 \ourhead{\kundennummer}{<%customernumber%>}{\mahnung}{<%dunning_id%>}{<%dunning%>}
 
-
-\begin{document}
-
 \setkomavar*{date}{\datum}
-
 \setkomavar{date}{<%dunning_date%>}
 \setkomavar{customer}{<%customernumber%>}
 \setkomavar{fromname}{<%employee_name%>}
 \setkomavar{fromphone}{<%employee_tel%>}
 \setkomavar{fromemail}{<%employee_email%>}
 \setkomavar{title}{
-	\mahnung
-	<%if dunning_id%>~\nr~<%dunning_id%>}}<%end if%>
+  \mahnung
+  <%if dunning_id%>~\nr~<%dunning_id%><%end if%>%
 }
 \setkomavar{transaction}{<%transaction_description%>}
 
+\begin{document}
+
 \begin{letter}{
-		<%name%>\strut\\
-		<%if department_1%><%department_1%>\\<%end if%>
-		<%if department_2%><%department_2%>\\<%end if%>
-		<%cp_givenname%> <%cp_name%>\strut\\
-		<%street%>\strut\\
-		<%zipcode%> <%city%>\strut\\
-		<%country%> \strut
-	}
-
-% Anrede nach Geschlecht unterscheiden
-\opening{
-	\ifstr{<%cp_name%>}{}
-		{\anrede}
-		{
-			\ifstr{<%cp_gender%>}{f}
-				{\anredefrau}
-				{\anredeherr}
-				<%cp_title%> <%cp_name%>,
-		}
+<%name%>\strut\\
+<%if department_1%><%department_1%>\\<%end if%>%
+<%if department_2%><%department_2%>\\<%end if%>%
+<%cp_givenname%> <%cp_name%>\strut\\
+<%street%>\strut\\
+<%zipcode%> <%city%>\strut\\
+<%country%> \strut
 }
+
+% Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
+% Bei natÃ¼rlichen Personen persÃ¶nliche Anrede, sonst allgemeine Anrede.
+\opening{
+\Ifstr{<%cp_name%>}{}
+{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
+  {
+    \Ifstr{<%cp_gender%>}{f}
+        {\anredefrau}
+        {\anredeherr}
+      <%cp_title%> <%cp_name%>,
+    }
+  }
 \thispagestyle{kivitendo.letter.first}
 
 \mahnungsformel
 
-\begin{SimpleTabular}[\bfseries\rechnung~\nr&\bfseries\datum&\bfseries\betrag]
-% eigentliche Tabelle
-<%foreach dn_invnumber%>
-    <%dn_invnumber%> & <%dn_transdate%> & <%dn_amount%> \currency \\[0.1cm]
-<%end dn_invnumber%>
+\begin{SimpleTabular}[headline=\bfseries\rechnung~\nr&\bfseries\datum&\bfseries\betrag,colspec=rXr<{\tabcurrency}]
+  % eigentliche Tabelle
+  <%foreach dn_invnumber%>%
+  <%dn_invnumber%> & <%dn_transdate%> & <%dn_amount%> \\[0.1cm]
+  <%end dn_invnumber%>%
 \end{SimpleTabular}
 
-\vspace{0.2cm}
+
+\smallskip
 
 \bitteZahlenBis~<%dunning_duedate%>.
 
