2 % Auftragsbestätigung Verkauf
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{\ordnumber}{$(ordnumber)$}
74 \newcommand{\docnumber}{{\quonumber}}
75 \newcommand{\orddate}{$(orddate)$}
76 \newcommand{\quodate}{$(quodate)$}
77 \newcommand{\kundennummer}{$(customernumber)$}
78 \newcommand{\reqdate}{$(reqdate)$}
79 \newcommand{\transdate}{$(transdate)$}
81 % ---------- Lieferadresse ----------
82 \newcommand{\shiptoname}{$(shiptoname)$}
83 \newcommand{\shiptocontact}{$(shiptocontact)$}
84 \newcommand{\shiptodepartmentone}{$(shiptodepartment_1)$}
85 \newcommand{\shiptodepartmenttwo}{$(shiptodepartment_2)$}
86 \newcommand{\shiptostreet}{$(shiptostreet)$}
87 \newcommand{\shiptocity}{$(shiptocity)$}
88 \newcommand{\shiptocountry}{$(shiptocountry)$}
89 \newcommand{\shiptophone}{$(shiptophone)$}
90 \newcommand{\shiptozipcode}{$(shiptozipcode)$}
91 \newcommand{\shiptofax}{$(shiptofax)$}
93 % ---------- Währungszeichen ----------
94 \newcommand{\currency}{$(currency)$}
95 \ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
96 \ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
97 \ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
98 \ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
100 % ---------- Ende Reportvariablen-Umsetzung ----------
102 % ---------- Briefkopf dazuladen ----------
103 \input{kivitendobriefkopf}
106 % ---------- Schrift Hauptdokuments (Computermodern-sanserif) ----------
107 % \fontfamily{cmss}\fontsize{10}{12pt plus 0.12pt minus 0.1pt}\selectfont
108 % ---------- Schrift Helvetica ------------------------
109 \fontfamily{phv}\fontsize{10}{12pt plus 0.12pt minus 0.1pt}\selectfont
110 % ---------- Firmenlogo nur erste Seite ----------
111 \thispagestyle{briefkopf}
113 % ---------- Datum und Nummern ----------
114 % Position unterhalb des Briefkopfs
115 \vspace*{\vlogospacing}
116 \renewcommand{\arraystretch}{0.9}
117 \begin{minipage}[b]{177mm}
118 \sperren{\textbf{Auftragsbestätigung Nr. \ordnumber}}
121 \begin{tabular}[b]{r@{\hspace{2mm}}p{\hlogospacing}}
122 \textbf{Seite} & {\thepage} von \pageref{LastPage}\\
123 \textbf{Datum} & \orddate \\
124 \textbf{Kunden Nr.} & \kundennummer\\
125 \textbf{Angebot Nr.} & \docnumber\\
126 \textbf{Auftragsbestätigung Nr.} & \ordnumber\\
127 \nonemptyline{\textbf{Vorraussichtl. Lieferdatum} &}{\reqdate}
128 \textbf{Ansprechpartner} & \employeename\\
129 \nonemptyline{\textbf{Durchwahl} &}{\employeetel}
130 \nonemptyline{\textbf{E-Mail} &}{\employeeemail}
131 \end{tabular}\\[10mm plus 20mm minus 10mm]
133 \renewcommand{\arraystretch}{1}
135 % ---------- Begrüßung und Bemerkungen ----------
138 wir bedanken uns für Ihren Auftrag %
139 \ifthenelse{\equal{\orddate}{\leer}}{}{vom \orddate{ }}%
140 und bestätigen Ihnen diesen wie folgt.\\
141 %Für Nachfragen steht Ihnen \employeename \ per Telefon (\employeetel) oder per E-Mail (\employeeemail) gerne zur Verfügung.\\[1\baselineskip]
142 \ifthenelse{\isempty{$(notes)$}}{}{
143 $(notes)$\\[1\baselineskip]
145 %Mit freundlichen Grüßen\\[1\baselineskip]
146 %\employeename\\[1\baselineskip]
147 % ---------- Die eigentliche-Tabelle ----------
148 % ---------- Tabelle puffern ----------
149 \begin{filecontents}{\employeetable}
150 % ---------- globale Variable laufsumme deklarieren ----------
152 % ---------- Spaltendefinition ----------
153 %\begin{longtable}{@{}rlX@{ }rlrr@{\makebox[\widthof{\textbf{~\currency}}]}}
154 \begin{longtable}{@{}rlX@{ }rlrr@{\makebox[\widthof{\textbf{}}]}}
155 % ---------- Kopfzeile der Tabelle ----------
158 \textbf{Bezeichnung} &
165 % ---------- Tabellenkopf nach dem Umbruch ----------
168 \textbf{Bezeichnung} &
174 & & \multicolumn{4}{r}{} & \MarkUebertrPos\\[1.5em]
176 % ---------- Fuss der Teiltabellen ----------
178 & & \multicolumn{4}{r}{} & \MarkZwsumPos \\
180 % ---------- Das Ende der Tabelle ----------
182 % & & \multicolumn{4}{r}{ Nettobetrag:} & \MarkZwsumPos \\
184 % ---------- Positionen ----------
189 \ifthenelse{\equal{$(longdescription)$}{}}{}{\newline
190 \renewcommand{\baselinestretch}{1}\footnotesize
191 {\footnotesize $(longdescription)$
192 \renewcommand{\baselinestretch}{1}\normalsize
194 \ifthenelse{\equal{$(deliverydate_oe)$}{\leer}}{}{
195 \newline Lieferdatum:~$(deliverydate_oe)$} &
198 \ifthenelse{\isempty{$(sellprice)$}}{&}{
199 \numprint{$(sellprice)$}
200 \ifthenelse{\equal{$(p_discount)$}{0}}{}{ -$(p_discount)$\%} &
201 \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}
206 % ---------- Ende der Hilfsdatei ----------
208 % ---------- Puffertabelle öffnen ----------
209 \LTXtable{\textwidth}{\employeetable}
211 %---------- Summenbereich nach recht schieben ----------
213 \setlength{\tabcolsep}{0mm}
214 \begin{tabular}{@{}r@{ }r@{ }l}
216 {Nettobetrag:}& \numprint{$(subtotal)$}& \currency\\
217 % ---------- Alle Steuern ausweisen ----------
219 % {$(taxdescription)$ auf }\numprint{$(taxbase)$}~\currency: & \numprint{$(tax)$}& \\
220 {$(taxdescription)$}: & \numprint{$(tax)$}& \currency\\
223 {\textbf{Gesamtbetrag:}} & \bfseries\numprint{$(ordtotal)$} & \textbf{\currency}\\
227 % ---------- Transportmittel ----------
229 Lieferung per $(shipvia)$.\\[1em]
231 % ---------- Lieferadresse ----------
233 \equal{\shiptoname}{\name} \AND
234 \equal{\shiptodepartmentone}{\leer} \AND
235 \equal{\shiptodepartmenttwo}{\leer} \AND
236 \equal{\shiptostreet}{\street} \AND
237 \equal{\shiptozipcode}{\zipcode} \AND
238 \equal{\shiptocity}{\city}
240 % ---------- Umbruch dazwischen verhindern ----------
243 % ---------- Bereich für Lieferadresse ----------
244 \textbf{Lieferanschrift:}\hfill\parbox[t]{0.7\textwidth}{
246 \nonemptyline{}{\shiptodepartmentone}
247 \nonemptyline{}{\shiptodepartmenttwo}
249 \shiptocountry{ }\shiptozipcode{ }\shiptocity\\[1mm]
250 \nonemptyline{Tel: }{\shiptophone}
251 \nonemptyline{Fax: }{\shiptofax}
257 \textbf{Zahlungsbedingungen:}\hfill\parbox[t]{0.7\textwidth}{$(payment_terms)$}\\[1em]
260 %Nutzen Sie bitte für Fragen oder Änderungswünsche die oben angegebenen Kontaktmöglichkeiten.\\ \vfil
262 Für Nachfragen steht Ihnen \employeename \ per Telefon (\employeetel) oder per E-Mail (\employeeemail) gerne zur Verfügung.\\
264 Wir sichern Ihnen eine termin- und fachgerechte Ausführung zu.\\
266 \vspace{1.5\baselineskip}
267 Mit freundlichen Grüßen\\ \vfil
272 Es gelten unsere Liefer- und Zahlungsbedingungen, die wir Ihnen auf Wunsch gerne zukommen lassen.