3 % Überarbeitet von Norbert Simon, n.simon@linet-services.de
4 % Version 2.5 vom 15. November 2011
5 % Basiert auf der Arbeit von kmk@lilalaser.de / 2007
6 % Diese Vorlage steht unter der GPL-Lizenz, Version 3
7 % siehe http://www.gnu.de/licenses/gpl-3.0.html
9 % config: tag-style=$( )$
12 \documentclass[twoside]{scrartcl}
13 \usepackage{fancyhdr} % Für den Seitenkopf und -Fuß
14 \usepackage{ifpdf} % Erlaubt eine Code-Weiche für PDF, oder DVI Ausgabe
15 \usepackage{xifthen} % Allgemeine Code-Weiche
16 \usepackage{graphicx} % Fuer die Einbindung der Logo-Graphik
17 \usepackage{german} % Deutsche Trenn-Tabelle
18 \usepackage[utf8]{inputenc} % Umlaute direkt eingeben
19 \usepackage{textcomp} % Sonderzeichen
20 \usepackage{lastpage} % Fuer die Angabe "Seite 2 von 5"
21 \usepackage{filecontents} % Um von latex aus eine Datei schreiben zu koennen
22 \usepackage{etex} % Damit Marken verwendet werden koennen
23 \usepackage{ltxtable} % Mehrseiten-Tabellen mit variabler Spaltenbreite
24 \usepackage{booktabs} % Striche in Tabellen
25 \usepackage{numprint} % Zahlen formatiert ausgeben
26 \usepackage[$(if myconfig_output_numberformat =~ "1.000,00")$german$(else)$$(if myconfig_output_numberformat =~ "1000,00")$germannosep$(else)$$(if myconfig_output_numberformat =~ "1,000.00")$english$(else)$englishnosep$(end)$$(end)$$(end)$]{zwischensumme} % Lokales Makro zur Berechnung der Zwischensummen
27 \usepackage{microtype,relsize} %Feinpositionierung, Sperren von Text
28 \newcommand*{\sperren}[1]{\normalsize\textls*[200]{#1}} %Sperrung Überrschriften
31 % ---------- Report-Variablen zur Verwendung in kivitendobriefkopf.tex ----------
32 % ---------- Die eigenen Daten ----------
33 \newcommand{\employeename}{$(employee_name)$}
34 \newcommand{\employeecompany}{$(employee_company)$}
35 \newcommand{\employeeaddress}{$(employee_address)$}
36 \newcommand{\employeetel}{$(employee_tel)$}
37 \newcommand{\employeefax}{$(employee_fax)$}
38 \newcommand{\employeeemail}{$(employee_email)$}
39 \newcommand{\employeecoustid}{$(employee_co_ustid)$}
40 \newcommand{\employeetaxnumber}{$(employee_taxnumber)$}
41 \newcommand{\employeetable}{tabelle$(employee_login)$.tex}
43 % ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
44 % \newcommand{\companybank}{$(company_bank)$}
45 % \newcommand{\companybankcode}{$(company_bank_code)$}
46 % \newcommand{\companyaccountnumber}{$(company_account_number)$}
48 % ---------- Adressat ----------
49 \newcommand{\name}{$(name)$}
50 \newcommand{\departmentone}{$(department_1)$}
51 \newcommand{\departmenttwo}{$(department_2)$}
52 \newcommand{\cpgreeting}{$(cp_greeting)$}
53 \newcommand{\cptitle}{$(cp_title)$}
54 \newcommand{\cpgivenname}{$(cp_givenname)$}
55 \newcommand{\cpname}{$(cp_name)$}
56 \newcommand{\street}{$(street)$}
57 \newcommand{\country}{$(country)$}
58 \newcommand{\zipcode}{$(zipcode)$}
59 \newcommand{\city}{$(city)$}
60 \newcommand{\phone}{$(customerphone)$}
61 \newcommand{\fax}{$(customerfax)$}
62 \newcommand{\lettergreeting}{
63 \ifthenelse{\equal{$(cp_gender)$}{f}}
64 {Sehr geehrte Frau $(cp_name)$,}
65 {\ifthenelse{\equal{$(cp_gender)$}{m}}
66 {Sehr geehrter Herr $(cp_name)$,}
67 {Sehr geehrte Damen und Herren,}
71 % ---------- Bestellvariablen ----------
72 \newcommand{\quonumber}{$(quonumber)$}
73 \newcommand{\docnumber}{Angebot Nr. {\quonumber}}
74 \newcommand{\quodate}{$(quodate)$}
75 \newcommand{\kundennummer}{$(customernumber)$}
76 \newcommand{\reqdate}{$(reqdate)$}
78 % ---------- Lieferadresse ----------
79 \newcommand{\shiptoname}{$(shiptoname)$}
80 \newcommand{\shiptocontact}{$(shiptocontact)$}
81 \newcommand{\shiptodepartmentone}{$(shiptodepartment_1)$}
82 \newcommand{\shiptodepartmenttwo}{$(shiptodepartment_2)$}
83 \newcommand{\shiptostreet}{$(shiptostreet)$}
84 \newcommand{\shiptocity}{$(shiptocity)$}
85 \newcommand{\shiptocountry}{$(shiptocountry)$}
86 \newcommand{\shiptophone}{$(shiptophone)$}
87 \newcommand{\shiptozipcode}{$(shiptozipcode)$}
88 \newcommand{\shiptofax}{$(shiptofax)$}
90 % ---------- Währungszeichen ----------
91 \newcommand{\currency}{$(currency)$}
92 \ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
93 \ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
94 \ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
95 \ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
97 % ---------- Ende Reportvariablen-Umsetzung ----------
99 % ---------- Briefkopf dazuladen ----------
100 \input{kivitendobriefkopf}
103 % ---------- Schrift Hauptdokuments (Computermodern-sanserif) ----------
104 % \fontfamily{cmss}\fontsize{10}{12pt plus 0.12pt minus 0.1pt}\selectfont
105 % ---------- Schrift Helvetica ------------------------
106 \fontfamily{phv}\fontsize{10}{12pt plus 0.12pt minus 0.1pt}\selectfont
107 % ---------- Firmenlogo nur erste Seite ----------
108 \thispagestyle{briefkopf}
110 % ---------- Datum und Nummern ----------
111 % Position unterhalb des Briefkopfs
112 \vspace*{\vlogospacing}
113 \renewcommand{\arraystretch}{0.9}
114 \begin{minipage}[b]{177mm}
115 \sperren{\textbf{Angebot Nr. \quonumber}}
118 \begin{tabular}[b]{r@{\hspace{2mm}}p{\hlogospacing}}
119 \textbf{Seite} & {\thepage} von \pageref{LastPage}\\
120 \textbf{Datum} & \quodate \\
121 \nonemptyline{\textbf{Gültig bis} &}{\reqdate}
122 \textbf{Kunden Nr.} & \kundennummer\\
123 \textbf{Angebot Nr.} & \quonumber\\
124 \textbf{Ansprechpartner} & \employeename\\
125 \nonemptyline{\textbf{Durchwahl} &}{\employeetel}
126 \nonemptyline{\textbf{E-Mail} &}{\employeeemail}
127 \end{tabular}\\[10mm plus 20mm minus 10mm]
129 \renewcommand{\arraystretch}{1}
131 % ---------- Begrüßung und Bemerkungen ----------
134 wir bedanken uns für Ihre Anfrage und bieten Ihnen gemäß unserer Liefer- und Zahlungsbedingungen hiermit freibleibend die nachfolgenden Positionen an.
135 \ifthenelse{\isempty{$(notes)$}}{}{
141 % ---------- Die eigentliche-Tabelle ----------
142 % ---------- Tabelle puffern ----------
143 \begin{filecontents}{\employeetable}
144 % ---------- globale Variable laufsumme deklarieren ----------
146 % ---------- Spaltendefinition ----------
147 %\begin{longtable}{@{}rlX@{ }rlrr@{\makebox[\widthof{\textbf{~\currency}}]}}
148 \begin{longtable}{@{}rlX@{ }rlrr@{\makebox[\widthof{\textbf{}}]}}
149 % ---------- Kopfzeile der Tabelle ----------
152 \textbf{Bezeichnung} &
159 % ---------- Tabellenkopf nach dem Umbruch ----------
162 \textbf{Bezeichnung} &
168 & & \multicolumn{4}{r}{} & \MarkUebertrPos\\[1.5em]
170 % ---------- Fuss der Teiltabellen ----------
172 & & \multicolumn{4}{r}{} & \MarkZwsumPos \\
174 % ---------- Das Ende der Tabelle ----------
176 % & & \multicolumn{4}{r}{ Nettobetrag:} & \MarkZwsumPos \\
178 % ---------- Positionen ----------
183 \ifthenelse{\equal{$(longdescription)$}{}}{}{\newline
184 \renewcommand{\baselinestretch}{1}\footnotesize
185 {\footnotesize $(longdescription)$
186 \renewcommand{\baselinestretch}{1}\normalsize
190 \ifthenelse{\isempty{$(sellprice)$}}{&}{
191 \numprint{$(sellprice)$}
192 \ifthenelse{\equal{$(p_discount)$}{0}}{}{ -$(p_discount)$\%} &
193 \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}
198 % ---------- Ende der Hilfsdatei ----------
200 % ---------- Puffertabelle öffnen ----------
201 \LTXtable{\textwidth}{\employeetable}
202 %---------- Bereich für die Summen ----------
204 %---------- Summenbereich nach rechts schieben ----------
206 \setlength{\tabcolsep}{0mm}
207 \begin{tabular}{@{}r@{ }r@{ }l}
209 {Nettobetrag:}& \numprint{$(subtotal)$}& \currency\\
210 % ---------- Alle Steuern ausweisen ----------
212 % {$(taxdescription)$ auf }\numprint{$(taxbase)$}~\currency: & \numprint{$(tax)$}& \\
213 {$(taxdescription)$}: & \numprint{$(tax)$}& \currency\\
216 {\textbf{Gesamtbetrag:}} & \bfseries\numprint{$(ordtotal)$} & \textbf{\currency}\\
220 % ---------- Nachbemerkung mit variablem Abstand ----------
224 \textbf{Das Angebot ist gültig bis zum \reqdate.}\\
228 \textbf{Zahlungsbedingungen:}\hfill\parbox[t]{0.7\textwidth}{$(payment_terms)$}\\
231 % ---------- Transportmittel ----------
233 Lieferung per $(shipvia)$.\\[1em]
235 % ---------- Lieferadresse ----------
237 \equal{\shiptoname}{\name} \AND
238 \equal{\shiptodepartmentone}{\leer} \AND
239 \equal{\shiptodepartmenttwo}{\leer} \AND
240 \equal{\shiptostreet}{\street} \AND
241 \equal{\shiptozipcode}{\zipcode} \AND
242 \equal{\shiptocity}{\city}
244 % ---------- Umbruch dazwischen verhindern ----------
247 % ---------- Bereich für Lieferadresse ----------
248 \textbf{Lieferanschrift:}\hfill\parbox[t]{0.7\textwidth}{
250 \nonemptyline{}{\shiptodepartmentone}
251 \nonemptyline{}{\shiptodepartmenttwo}
253 \shiptocountry{ }\shiptozipcode{ }\shiptocity\\[1mm]
254 \nonemptyline{Tel: }{\shiptophone}
255 \nonemptyline{Fax: }{\shiptofax}
261 Sollten Sie Fragen zu unserem Angebot haben, steht Ihnen \employeename \ per Telefon (\employeetel) oder per E-Mail (\employeeemail) gerne zur Verfügung.
262 Wir hoffen, dass unser Angebot Ihre Zustimmung findet und würden uns freuen Ihren Auftrag zu erhalten.\par
263 \vspace{1.5\baselineskip}
264 Mit freundlichen Grüßen\\ \vfil
267 %\vspace{1.5\baselineskip}
269 \textbf{Wollen Sie direkt bestellen?}\\[1.2em]
270 \small{Machen Sie durch Ihren Stempel und Ihre Unterschrift unser Angebot Nr. \quonumber \ zum Auftrag.}\\[1.2em]
271 \vspace{2.5\baselineskip}\\
273 \hspace*{5em}Datum, Unterschrift \\
276 Es gelten unsere Liefer- und Zahlungsbedingungen, die wir Ihnen auf Wunsch gerne zukommen lassen.