b764c1da5b143a06d745e9bfda0d3b0563b6ba7e
[kivitendo-erp.git] / templates / print / marei / credit_note.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{\kundennummer}{<%customernumber%>}{\gutschrift}{<%invnumber%>}{<%invdate%>}
17
18 \setkomavar*{date}{\datum}
19 \setkomavar{date}{<%invdate%>}
20 \setkomavar{customer}{<%customernumber%>}
21 \setkomavar{fromname}{<%employee_name%>}
22 \setkomavar{fromphone}{<%employee_tel%>}
23 \setkomavar{fromemail}{<%employee_email%>}
24 \setkomavar{title}{
25   \gutschrift~
26   \nr ~<%invnumber%>%
27 }
28
29 <%if invnumber_for_credit_note%>%
30   \setkomavar*{myref}{\fuerRechnung}
31   \setkomavar{myref}{<%invnumber_for_credit_note%>}
32 <%end if%>%
33
34 \setkomavar{transaction}{<%transaction_description%>}
35 <%if shiptoname%>%
36 \makeatletter
37 \begin{lrbox}\shippingAddressBox
38   \parbox{\useplength{toaddrwidth}}{
39     \backaddr@format{\scriptsize\usekomafont{backaddress}%
40       \strut\abweichendeLieferadresse
41     }
42     \par\smallskip
43     \setlength{\parskip}{\z@}
44     \par
45     \normalsize
46     <%shiptoname%>\par
47     <%if shiptocontact%> <%shiptocontact%><%end if%>\par
48     <%shiptodepartment_1%>\par
49     <%shiptodepartment_2%>\par
50     <%shiptostreet%>\par
51     <%shiptozipcode%> <%shiptocity%>%
52   }
53 \end{lrbox}
54 \makeatother
55 <%end if%>%
56
57 \begin{document}
58
59 \begin{letter}{
60 <%name%>\strut\\
61 <%if department_1%><%department_1%>\\<%end if%>%
62 <%if department_2%><%department_2%>\\<%end if%>%
63 <%cp_givenname%> <%cp_name%>\strut\\
64 <%street%>\strut\\
65 <%zipcode%> <%city%>\strut\\
66 <%country%> \strut
67 }
68
69 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
70 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
71 \opening{
72 \Ifstr{<%cp_name%>}{}
73 {<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
74   {
75     \Ifstr{<%cp_gender%>}{f}
76         {\anredefrau}
77         {\anredeherr}
78       <%cp_title%> <%cp_name%>,
79     }
80   }
81 \thispagestyle{kivitendo.letter.first}
82
83
84 \gutschriftformel
85
86 <%if notes%>%
87 <%notes%>%
88 \vspace{0.5cm}
89 <%end if%>%
90
91
92 \begin{PricingTabular*}%
93   % eigentliche Tabelle%
94   \FakeTable{%
95   <%foreach number%>%
96   <%runningnumber%> &%
97   <%number%> &%
98   \textbf{<%description%>}%
99   <%if longdescription%>\ExtraDescription{<%longdescription%>}<%end longdescription%>%
100   <%if serialnumber%>\ExtraDescription{\seriennummer: <%serialnumber%>}<%end serialnumber%>%
101   <%if ean%>\ExtraDescription{\ean: <%ean%>}<%end ean%>%
102   <%if projectnumber%>\ExtraDescription{\projektnummer: <%projectnumber%>}<%end projectnumber%>%
103   &%
104   <%qty%> <%unit%> &%
105   <%sellprice%>&%
106   \Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
107     <%linetotal%>\tabularnewline%
108     <%end number%>%
109   }%
110   \begin{PricingTotal}%
111     % Tabellenende letzte Seite
112     \nettobetrag & <%subtotal%>\\%
113     <%foreach tax%>%
114     <%taxdescription%> & <%tax%>\\%
115     <%end tax%>%
116     \bfseries\schlussbetrag &  \bfseries <%invtotal%>\\%
117   \end{PricingTotal}%
118 \end{PricingTabular*}
119
120
121 \closing{\gruesse}
122
123 \end{letter}
124
125 \end{document}