677e2abd6c7018e7e27f8f4bc68292db938bfb26
[kivitendo-erp.git] / templates / print / marei / purchase_order.tex
1 \documentclass[paper=a4,fontsize=10pt]{scrartcl}
2 \usepackage{kiviletter}
3
4
5 % Variablen, die in settings verwendet werden
6 \newcommand{\lxlangcode} {<%template_meta.language.template_code%>}
7 \newcommand{\lxmedia} {<%media%>}
8 \newcommand{\lxcurrency} {<%currency%>}
9 \newcommand{\kivicompany} {<%employee_company%>}
10
11 % settings: Einstellungen, Logo, Briefpapier, Kopfzeile, Fusszeile
12 \input{insettings.tex}
13
14
15 % laufende Kopfzeile:
16 \ourhead{}{}{\bestellung}{<%ordnumber%>}{<%orddate%>}
17
18
19 \setkomavar*{date}{\datum}
20 \setkomavar{date}{<%orddate%>}
21
22 \setkomavar{fromname}{<%employee_name%>}
23 \setkomavar{fromphone}{<%employee_tel%>}
24 \setkomavar{fromemail}{<%employee_email%>}
25 \setkomavar{title}{
26         \bestellung~
27         \nr~<%ordnumber%>%
28 }
29
30 <%if cusordnumber%>%
31         \setkomavar*{yourref}{\unsereBestellnummer}
32         \setkomavar{yourref}{<%cusordnumber%>}
33 <%end if%>%
34 \setkomavar{transaction}{<%transaction_description%>}
35
36 <%if quonumber%>
37         \setkomavar{quote}{<%quonumber%>}
38 <%end if%>%
39
40 <%if shiptoname%>%
41 \makeatletter
42 \begin{lrbox}\shippingAddressBox
43         \parbox{\useplength{toaddrwidth}}{
44                 \backaddr@format{\scriptsize\usekomafont{backaddress}%
45                         \strut abweichende Lieferadresse
46                 }
47                 \par\smallskip
48                 \setlength{\parskip}{\z@}
49                 \par
50                 \normalsize
51                 <%shiptoname%>\par
52                 <%if shiptocontact%> <%shiptocontact%><%end if%>\par
53                 <%shiptodepartment_1%>\par
54                 <%shiptodepartment_2%>\par
55                 <%shiptostreet%>\par
56                 <%shiptozipcode%> <%shiptocity%>%
57         }
58 \end{lrbox}
59 \makeatother
60 <%end if%>%
61
62 \begin{document}
63
64 \begin{letter}{
65                 <%name%>\strut\\
66                 <%if department_1%><%department_1%>\\<%end if%>%
67                 <%if department_2%><%department_2%>\\<%end if%>%
68                 <%cp_givenname%> <%cp_name%>\strut\\
69                 <%street%>\strut\\
70                 <%zipcode%> <%city%>\strut\\
71                 <%country%> \strut
72         }
73
74 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
75 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
76 \opening{
77         \Ifstr{<%cp_name%>}{}
78         {<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
79         {
80                 \Ifstr{<%cp_gender%>}{f}
81                         {\anredefrau}
82                         {\anredeherr}
83                         <%cp_title%> <%cp_name%>,
84         }
85 }
86 \thispagestyle{kivitendo.letter.first}
87
88 \bestellformel
89
90 \begin{PricingTabular*}
91         % eigentliche Tabelle
92         \FakeTable{
93         <%foreach number%>%
94                 <%runningnumber%> &%
95                 <%number%> &%
96                 \textbf{<%description%>}%
97                 <%if longdescription%>\ExtraDescription{<%longdescription%>}<%end longdescription%>%
98                 <%if reqdate%>\ExtraDescription{\lieferdatum: <%reqdate%>}<%end reqdate%>%
99                 <%if serialnumber%>\ExtraDescription{\seriennummer: <%serialnumber%>}<%end serialnumber%>%
100                 <%if ean%>\ExtraDescription{\ean: <%ean%>}<%end ean%>%
101                 <%if projectnumber%>\ExtraDescription{\projektnummer: <%projectnumber%>}<%end projectnumber%>%
102                 &%
103                 <%qty%> <%unit%> &%
104                 <%sellprice%>&%
105                 \Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
106                 <%linetotal%>\tabularnewline
107         <%end number%>%
108         }%
109         \begin{PricingTotal}%
110                 % Tabellenende letzte Seite
111                 \nettobetrag & <%subtotal%>\\%
112                 <%foreach tax%>%
113                 <%taxdescription%> & <%tax%>\\%
114                 <%end tax%>%
115                 \bfseries\schlussbetrag &  \bfseries <%ordtotal%>\\%
116         \end{PricingTotal}
117 \end{PricingTabular*}
118
119 <%if notes%>%
120 <%notes%>%
121 \medskip
122 <%end if%>%
123
124 <%if delivery_term%>%
125   \lieferung ~<%delivery_term.description_long%>\\
126 <%end delivery_term%>%
127
128 \closing{\gruesse}
129 \end{letter}
130
131 \end{document}