1 % config: use-template-toolkit=1
2 % config: tag-style=$( )$
8 $( KiviLatex.required_packages_for_html )$
10 % Variablen, die in settings verwendet werden
11 \newcommand{\lxlangcode} {$( template_meta.language.template_code )$}
12 \newcommand{\lxmedia} {$( media )$}
13 \newcommand{\lxcurrency} {$( reclamation.currency.name )$}
14 \newcommand{\kivicompany} {$( employee_company )$}
16 % settings: Einstellungen, Logo, Briefpapier, Kopfzeile, Fusszeile
17 \input{insettings.tex}
20 \ourhead{\kundennummer}{$( KiviLatex.filter(reclamation.customervendor.number) )$}{\ekreklamation}{$( KiviLatex.filter(reclamation.record_number) )$}{$( reclamation.transdate_as_date )$}
25 \begin{minipage}[t]{8cm}
28 {\color{gray}\underline{\firma\ $\cdot$ \strasse\ $\cdot$ \ort}}
33 $( KiviLatex.filter(reclamation.customervendor.name ) )$
35 $( IF (reclamation.customervendor.department_1) )$$( KiviLatex.filter(reclamation.customervendor.department_1) )$\\$( END )$%
37 $( IF (reclamation.customervendor.department_2) )$$( KiviLatex.filter(reclamation.customervendor.department_2) )$\\$( END )$%
39 $( KiviLatex.filter(reclamation.contact.cp_givenname) )$ $( KiviLatex.filter(reclamation.contact.cp_name) )$
41 $( KiviLatex.filter(reclamation.customervendor.street) )$
45 $( KiviLatex.filter(reclamation.customervendor.zipcode) )$ $( KiviLatex.filter(reclamation.customervendor.city) )$
47 $( KiviLatex.filter(reclamation.customervendor.country) )$
50 \begin{minipage}[t]{6cm}
51 \hfill{\LARGE\textbf{\ekreklamation}}
55 \hfill{\large\textbf{\nr ~$( KiviLatex.filter(reclamation.record_number) )$}}
59 \datum:\hfill $( reclamation.transdate_as_date )$
61 \lieferdatum:\hfill $( reclamation.reqdate_as_date )$
63 \kundennummer:\hfill $( KiviLatex.filter(reclamation.customervendor.number) )$
65 \ansprechpartner:\hfill $( KiviLatex.filter(employee_name) )$
67 \textTelefon \hfill $( KiviLatex.filter(employee_tel) )$
69 \textEmail \hfill $( KiviLatex.filter(employee_email) )$
72 $( IF (reclamation.shipto.shiptoname) )$%
74 \scriptsize \underline{\abweichendeLieferadresse:}\\
75 \normalsize $( KiviLatex.filter(reclamation.shipto.shiptoname) )$
77 $( IF reclamation.shipto.shiptocontact )$ $( KiviLatex.filter(reclamation.shipto.shiptocontact) )$$( END )$
79 $( KiviLatex.filter(reclamation.shipto.shiptodepartment_1) )$
81 $( KiviLatex.filter(reclamation.shipto.shiptodepartment_2) )$
83 $( KiviLatex.filter(reclamation.shipto.shiptostreet) )$
85 $( KiviLatex.filter(reclamation.shipto.shiptozipcode) )$ $( KiviLatex.filter(reclamation.shipto.shiptocity) )$
91 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
92 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
93 \ifthenelse{\equal{$( reclamation.contact.cp_name )$}{}}{
94 $( IF reclamation.customervendor.natural_person )$$( KiviLatex.filter(reclamation.customervendor.greeting) )$ $( KiviLatex.filter(reclamation.customervendor.name) )$,$( ELSE )$\anrede$( END )$}{
95 \ifthenelse{\equal{$( reclamation.contact.cp_gender )$}{f}}
96 {\anredefrau}{\anredeherr} $( KiviLatex.filter(reclamation.contact.cp_title) )$ $( KiviLatex.filter(reclamation.contact.cp_name) )$,}\\
98 \ekreklamationsformel\\
102 %% Diese Variable kann auf 1 gesetzt werden, wenn Preise angezeigt werden sollen.
103 $( SET show_prices = 0 )$
106 % - longtable kann innerhalb der Tabelle umbrechen
107 % - da der Umbruch nicht von Lx-Office kontrolliert wird, kann man keinen
109 % - Innerhalb des Langtextes $( longdescription )$ wird nicht umgebrochen.
110 % Falls das gewünscht ist, \\ mit \renewcommand umschreiben (siehe dazu:
111 % http://www.lx-office.org/uploads/media/Lx-Office_Anwendertreffen_LaTeX-Druckvorlagen-31.01.2011_01.pdf)
113 \setlength\LTleft\parindent % Tabelle beginnt am linken Textrand
114 \setlength\LTright{0pt} % Tabelle endet am rechten Textrand
115 $( IF show_prices -)$
116 \begin{longtable}{@{}rrp{7cm}@{\extracolsep{\fill}}rrr@{}}
118 \begin{longtable}{@{}rrp{10.7cm}@{\extracolsep{\fill}}r@{}}
123 $( IF show_prices -)$
124 \textbf{\position} & \textbf{\artikelnummer} & \textbf{\bezeichnung} & \textbf{\menge} & \textbf{\einzelpreis} & \textbf{\gesamtpreis} \\
126 \textbf{\position} & \textbf{\artikelnummer} & \textbf{\bezeichnung} & \textbf{\menge} \\
131 % Tabellenkopf erste Seite
133 $( IF show_prices -)$
134 \textbf{\position} & \textbf{\artikelnummer} & \textbf{\bezeichnung} & \textbf{\menge} & \textbf{\einzelpreis} & \textbf{\gesamtpreis} \\
136 \textbf{\position} & \textbf{\artikelnummer} & \textbf{\bezeichnung} & \textbf{\menge} \\
141 $( IF show_prices -)$
144 \multicolumn{6}{@{}r@{}}{\weiteraufnaechsterseite}
147 % Tabellenende letzte Seite
149 \multicolumn{5}{@{}l}{\nettobetrag} & $( reclamation.netamount_as_number )$ \currency\\
150 $( FOREACH tax = reclamation.taxes )$
151 \multicolumn{5}{@{}l}{$( KiviLatex.filter(tax.tax.translated_attribute('taxdescription', reclamation.language_id)) )$} & $( LxERP.format_amount(tax.amount, 2) )$ \currency\\
153 \multicolumn{5}{@{}l}{\textbf{\schlussbetrag}} & \textbf{$( reclamation.amount_as_number )$} \currency\\
156 $( ELSE -)$ %% IF show_prices
159 \multicolumn{4}{@{}r@{}}{\weiteraufnaechsterseite}
162 % Tabellenende letzte Seite
165 $( END )$ %% IF show_prices
167 % eigentliche Tabelle
168 $( FOREACH item = reclamation.items_sorted -)$
169 $( item.position )$ &
170 $( KiviLatex.filter(item.part.partnumber) )$ &
171 \textbf{$( KiviLatex.filter(item.description) )$} &
172 $( item.qty_as_number )$ $( KiviLatex.filter(item.unit_obj.get_translation(reclamation.language_id, item.qty)) )$ $( IF show_prices -)$ &
173 $( item.sellprice_as_number )$ \currency &
174 \ifthenelse{\equal{$( item.discount )$}{0}}{}{\sffamily\scriptsize{(-$( item.discount_as_percent )$ \%)}}
175 \ourfont{$( LxERP.format_amount(item.linetotal, 2) )$ \currency} $( END -)$\\* % kein Umbruch nach der ersten Zeile, damit Beschreibung und Langtext nicht getrennt werden
177 $( IF item.longdescription )$ && \scriptsize $( KiviLatex.filter_html(item.longdescription) )$\\$( END )$
178 $( IF item.reqdate )$ && \scriptsize \lieferdatum: $( item.reqdate_as_date )$\\$( END )$
179 $( IF item.serialnumber )$ && \scriptsize \seriennummer: $( KiviLatex.filter(item.serialnumber) )$\\$( END )$
180 $( IF item.part.ean )$ && \scriptsize \ean: $( KiviLatex.filter(item.part.ean) )$\\$( END )$
181 $( IF item.projectnumber )$ && \scriptsize \projektnummer: $( KiviLatex.filter(item.projectnumber) )$\\$( END )$
182 $( IF item.part.customerprices.size )$
183 $( FOREACH customerprice = item.part.customerprices )$
184 $( IF customerprice.customer_id == reclamation.customervendor.id )$
185 && \kundenartnr: $( KiviLatex.filter(customerprice.customer_partnumber) )$\\
191 $( IF (item.reason.description) )$ && \scriptsize \grund: $( KiviLatex.filter(item.reason.description) )$\\$( END )$
192 $( IF (item.reason_description_ext) )$ && \scriptsize $( KiviLatex.filter(item.reason_description_ext) )$\\$( END )$
201 $( IF reclamation.notes )$
203 $( KiviLatex.filter_html(reclamation.notes) )$
207 $( IF reclamation.delivery_term )$
208 \lieferung ~$( KiviLatex.filter(reclamation.delivery_term.translated_attribute('description_long', reclamation.language_id)) )$\\
212 $( KiviLatex.filter(employee_name) )$