X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/96f2dabc7d64e28c74358fb5745a6c68b18527f3..08e820f:/templates/print/RB/letter.tex

diff --git a/templates/print/RB/letter.tex b/templates/print/RB/letter.tex
index f783eca1a..df1bcde1e 100644
--- a/templates/print/RB/letter.tex
+++ b/templates/print/RB/letter.tex
@@ -1,17 +1,22 @@
+% config: use-template-toolkit=1
+% config: tag-style=$( )$
+$( USE KiviLatex )$
+$( USE P )$
+$( SET customer = letter.customer_vendor )$
 \input{inheaders.tex}
-
+$( KiviLatex.required_packages_for_html )$
 
 % Variablen, die in settings verwendet werden
-\newcommand{\lxlangcode} {<%template_meta.language.template_code%>}
-\newcommand{\lxmedia} {<%media%>}
-\newcommand{\lxcurrency} {<%currency%>}
-\newcommand{\lxtitlebar} {<%titlebar%>}
+\newcommand{\lxlangcode}{$(template_meta.language.template_code)$}
+\newcommand{\lxmedia}{$(template_meta.media)$}
+\newcommand{\lxcurrency}{}
+\newcommand{\kivicompany}{$(employee_company)$}
 
 % settings: Einstellungen, Logo, Briefpapier, Kopfzeile, Fusszeile
 \input{insettings.tex}
 
 % laufende Kopfzeile:
-%\ourhead{}{}{<%subject%>}{<%letternumber%>}{<%date%>}
+%\ourhead{}{}{$( KiviLatex.filter(letter.subject) )$}{$( KiviLatex.filter(letter.letternumber) )$}{$( KiviLatex.filter(letter.date.to_kivitendo) )$}
 \ourhead{}{}{}{}{}
 
 \begin{document}
@@ -22,61 +27,50 @@
 
 \begin{minipage}{14cm}
 
-  <%name%>
+  $( KiviLatex.filter(customer.name) )$
 
-  <%contact_formal%>
+  $( KiviLatex.filter(letter.contact.formal_greeting) )$
 
-  <%street%>
+  $( KiviLatex.filter(customer.street) )$
 
-  <%zipcode%> <%city%>
+  $( KiviLatex.filter(customer.zipcode) )$ $( KiviLatex.filter(customer.city) )$
 
-  <%country%>
+  $( KiviLatex.filter(customer.country) )$
 
 \end{minipage}
 
 \vspace{2.5cm}
-\hfill<%date%>
+\hfill $( KiviLatex.filter(letter.date.to_kivitendo) )$
 
-<%if reference%>
-\textbf{\ihrzeichen : <%reference%>}
-<%end if%>
+$( IF letter.reference )$
+\textbf{\ihrzeichen : $( KiviLatex.filter(letter.reference) )$}
 
 \vspace{1cm}
+$( END )$
 
-<%if subject%>
-\textbf{\betreff : <%subject%>}
-<%end if%>
+$( IF letter.subject )$
+\textbf{\betreff : $( KiviLatex.filter(letter.subject) )$}
 
 \vspace{1cm}
+$( END )$
 
-  <%greeting%>
+$( KiviLatex.filter(letter.greeting) )$
 
 \vspace{0.5cm}
 
-  <%body%>
+$( KiviLatex.filter_html(letter.body) )$
 
 \vspace{0.5cm}
 
-  <%close%>
-
-  <%company_name%>
-
-\vspace*{0.5cm}
-
 \begin{minipage}{6cm}
 
-\textbf{<%employee_name%>}
-
-<%employee_position%>
+\textbf{$( KiviLatex.filter(letter.employee.name) )$}
 
 \end{minipage}
 \begin{minipage}{6cm}
 
-\textbf{<%salesman_name%>}
-
-<%salesman_position%>
+\textbf{$( KiviLatex.filter(letter.salesman.name) )$}
 
 \end{minipage}
 
 \end{document}
-
