356f68522453ba9941e428841c2d50a3ce8ab3a5
[kivitendo-erp.git] / templates / print / Standard / sales_quotation.tex
1 % salex_quotation.tex
2 % Verkauf - Angebot
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
8 % ----------
9 % config: tag-style=$( )$
10 % ----------
11
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
29
30
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}{$(template_meta.tmpfile NOESCAPE)$.table.tex}
42
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)$}
47
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,}
68         }\\[1\baselineskip]
69 }
70
71 % ---------- Bestellvariablen ----------
72 \newcommand{\quonumber}{$(quonumber)$}
73 \newcommand{\docnumber}{Angebot Nr. {\quonumber}}
74 \newcommand{\quodate}{$(quodate)$}
75 \newcommand{\kundennummer}{$(customernumber)$}
76 \newcommand{\reqdate}{$(reqdate)$}
77
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)$}
89
90 % ---------- Währungszeichen ----------
91 \newcommand{\currency}{\euro}
92 \ifthenelse{\equal{$(currency)$}{YEN}}{\let\currency\textyen}{}
93 \ifthenelse{\equal{$(currency)$}{GBP}}{\let\currency\pounds}{}
94 \ifthenelse{\equal{$(currency)$}{USD}}{\let\currency\$}{}
95
96 % ---------- Ende Reportvariablen-Umsetzung ----------
97
98 % ---------- Briefkopf dazuladen ----------
99 \input{kivitendobriefkopf}
100
101 \begin{document}
102 % ---------- Schrift Hauptdokuments (Computermodern-sanserif)  ----------
103 % \fontfamily{cmss}\fontsize{10}{12pt plus 0.12pt minus 0.1pt}\selectfont
104 % ---------- Schrift Helvetica ------------------------
105 \fontfamily{phv}\fontsize{10}{12pt plus 0.12pt minus 0.1pt}\selectfont
106 % ---------- Firmenlogo nur erste Seite ----------
107 \thispagestyle{briefkopf}
108
109 % ---------- Datum und Nummern ----------
110 % Position unterhalb des Briefkopfs
111 \vspace*{\vlogospacing}
112 \renewcommand{\arraystretch}{0.9}
113 \begin{minipage}[b]{177mm}
114 \sperren{\textbf{Angebot Nr. \quonumber}}
115 \hfill
116         \small
117         \begin{tabular}[b]{r@{\hspace{2mm}}p{\hlogospacing}}
118                 \textbf{Seite} & {\thepage} von \pageref{LastPage}\\
119                 \textbf{Datum} & \quodate \\
120                 \nonemptyline{\textbf{Gültig bis} &}{\reqdate}
121                 \textbf{Kunden Nr.} & \kundennummer\\
122                 \textbf{Angebot Nr.} & \quonumber\\
123                 \textbf{Ansprechpartner} & \employeename\\
124                 \nonemptyline{\textbf{Durchwahl} &}{\employeetel}
125                 \nonemptyline{\textbf{E-Mail} &}{\employeeemail}
126         \end{tabular}\\[10mm plus 20mm minus 10mm]
127 \end{minipage}
128 \renewcommand{\arraystretch}{1}
129 \normalsize
130 % ---------- Begrüßung und Bemerkungen ----------
131 \vspace{5mm}
132 \lettergreeting
133 wir bedanken uns für Ihre Anfrage und bieten Ihnen gemäß unserer Liefer- und Zahlungsbedingungen hiermit freibleibend die nachfolgenden Positionen an.
134 \ifthenelse{\isempty{$(notes)$}}{}{
135       \newline
136       $(notes)$
137       }
138 \vspace{5mm}
139
140 % ---------- Die eigentliche-Tabelle ----------
141 % ---------- Tabelle puffern ----------
142 \begin{filecontents}{\employeetable}
143 % ---------- globale Variable laufsumme deklarieren ----------
144 \resetlaufsumme
145 % ---------- Spaltendefinition ----------
146 %\begin{longtable}{@{}rlX@{ }rlrr@{\makebox[\widthof{\textbf{~\currency}}]}}
147 \begin{longtable}{@{}rlX@{ }rlrr@{\makebox[\widthof{\textbf{}}]}}
148 % ---------- Kopfzeile der Tabelle ----------
149         \textbf{Pos} &
150         \textbf{Art.Nr.} &
151         \textbf{Bezeichnung} &
152         \textbf{Menge} &
153         \textbf{ME} &
154         \textbf{EP/€} &
155         \textbf{GP/€} \\
156         \midrule
157   \endfirsthead
158 % ---------- Tabellenkopf nach dem Umbruch ----------
159         \textbf{Pos} &
160         \textbf{Art.Nr.} &
161         \textbf{Bezeichnung} &
162         \textbf{Menge} &
163         \textbf{ME} &
164         \textbf{EP/€} &
165         \textbf{GP/€} \\
166         \midrule
167         & & \multicolumn{4}{r}{} & \MarkUebertrPos\\[1.5em]
168   \endhead
169 % ---------- Fuss der Teiltabellen ----------
170         \midrule
171         & & \multicolumn{4}{r}{} & \MarkZwsumPos \\
172   \endfoot
173 % ---------- Das Ende der Tabelle ----------
174         \midrule
175 %       & & \multicolumn{4}{r}{ Nettobetrag:} & \MarkZwsumPos \\
176   \endlastfoot
177 % ---------- Positionen ----------
178   $(foreach number)$
179         $(runningnumber)$ &
180         $(number)$ &
181         $(description)$
182         \ifthenelse{\equal{$(longdescription)$}{}}{}{\newline
183         \renewcommand{\baselinestretch}{1}\footnotesize
184         {\footnotesize $(longdescription)$
185         \renewcommand{\baselinestretch}{1}\normalsize
186         }} &
187         $(qty)$ &
188         $(unit)$ &
189         \ifthenelse{\isempty{$(sellprice)$}}{&}{
190                 \numprint{$(sellprice)$}
191                 \ifthenelse{\equal{$(p_discount)$}{0}}{}{ -$(p_discount)$\%} &
192                 \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}
193         }\\ %
194   $(end number)$
195
196 \end{longtable}
197 % ----------  Ende der Hilfsdatei ----------
198 \end{filecontents}
199 % ---------- Puffertabelle öffnen ----------
200 \LTXtable{\textwidth}{\employeetable}
201 %---------- Bereich für die Summen ----------
202 \parbox{\textwidth}{
203 %---------- Summenbereich nach rechts schieben  ----------
204 \hfill
205 \setlength{\tabcolsep}{0mm}
206 \begin{tabular}{@{}r@{ }r@{ }l}
207 %   \toprule
208    {Nettobetrag:}& \numprint{$(subtotal)$}& \currency\\
209 % ---------- Alle Steuern ausweisen ----------
210    $(foreach tax)$
211 %       {$(taxdescription)$ auf }\numprint{$(taxbase)$}~\currency: & \numprint{$(tax)$}& \\
212                 {$(taxdescription)$}:  & \numprint{$(tax)$}& \currency\\
213    $(end tax)$
214    \midrule
215    {\textbf{Gesamtbetrag:}} & \bfseries\numprint{$(ordtotal)$} & \textbf{\currency}\\
216    \bottomrule
217 \end{tabular}
218 }
219 % ---------- Nachbemerkung mit variablem Abstand ----------
220 \vfil
221 $(if reqdate)$
222 \vspace*{0.3em}
223 \textbf{Das Angebot ist gültig bis zum \reqdate.}\\
224 \vfil
225 $(end)$
226 $(if payment_terms)$
227 \textbf{Zahlungsbedingungen:}\hfill\parbox[t]{0.7\textwidth}{$(payment_terms)$}\\
228 \vfil
229 $(end)$
230 % ---------- Transportmittel ----------
231 $(if shipvia)$
232 Lieferung per $(shipvia)$.\\[1em]
233 $(end)$
234 % ---------- Lieferadresse ----------
235 \ifthenelse{%
236          \equal{\shiptoname}{\name} \AND
237          \equal{\shiptodepartmentone}{\leer} \AND
238          \equal{\shiptodepartmenttwo}{\leer} \AND
239          \equal{\shiptostreet}{\street} \AND
240          \equal{\shiptozipcode}{\zipcode} \AND
241          \equal{\shiptocity}{\city}
242  }{}{
243 % ---------- Umbruch dazwischen verhindern ----------
244 \vspace*{0.5em}
245 \parbox{\textwidth}{
246 % ---------- Bereich für Lieferadresse ----------
247 \textbf{Lieferanschrift:}\hfill\parbox[t]{0.7\textwidth}{
248                                 \shiptoname \\
249                                 \nonemptyline{}{\shiptodepartmentone}
250                                 \nonemptyline{}{\shiptodepartmenttwo}
251                                 \shiptostreet \\
252                                 \shiptocountry{ }\shiptozipcode{ }\shiptocity\\[1mm]
253                                 \nonemptyline{Tel: }{\shiptophone}
254                                 \nonemptyline{Fax: }{\shiptofax}
255                         }%ende parbox
256         }% ende parbox
257 }% ende ifthenelse
258 \vspace*{0.5em}
259 \parbox{\textwidth}{
260 Sollten Sie Fragen zu unserem Angebot haben, steht Ihnen \employeename \ per Telefon (\employeetel) oder per E-Mail (\employeeemail) gerne zur Verfügung.
261 Wir hoffen, dass unser Angebot Ihre Zustimmung findet und würden uns freuen Ihren Auftrag zu erhalten.\par
262 \vspace{1.5\baselineskip}
263 Mit freundlichen Grüßen\\ \vfil
264 \employeename
265 }% Ende parbox
266 %\vspace{1.5\baselineskip}
267 \vfill
268 \textbf{Wollen Sie direkt bestellen?}\\[1.2em]
269 \small{Machen Sie durch Ihren Stempel und Ihre Unterschrift unser Angebot Nr. \quonumber \ zum Auftrag.}\\[1.2em]
270 \vspace{2.5\baselineskip}\\
271 \rule{20em}{0.1pt}\\
272 \hspace*{5em}Datum, Unterschrift \\
273 \vfill
274 \footnotesize
275 Es gelten unsere Liefer- und Zahlungsbedingungen, die wir Ihnen auf Wunsch gerne zukommen lassen.
276 \end{document}