MT940-Import: AQBanking-Unterstützung entfernt
[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}{<%transdate%>}        
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
35
36 <%if shiptoname%>%
37 \makeatletter
38 \begin{lrbox}\shippingAddressBox
39         \parbox{\useplength{toaddrwidth}}{
40                 \backaddr@format{\scriptsize\usekomafont{backaddress}%
41                         \strut\abweichendeLieferadresse
42                 }
43                 \par\smallskip
44                 \setlength{\parskip}{\z@}
45                 \par
46                 \normalsize
47                 <%shiptoname%>\par
48                 <%if shiptocontact%> <%shiptocontact%><%end if%>\par
49                 <%shiptodepartment_1%>\par
50                 <%shiptodepartment_2%>\par
51                 <%shiptostreet%>\par
52                 <%shiptozipcode%> <%shiptocity%>%
53         }
54 \end{lrbox}
55 \makeatother
56 <%end if%>%
57
58 \begin{document}
59
60 \begin{letter}{
61                 <%name%>\strut\\
62                 <%if department_1%><%department_1%>\\<%end if%>%
63                 <%if department_2%><%department_2%>\\<%end if%>%
64                 <%cp_givenname%> <%cp_name%>\strut\\
65                 <%street%>\strut\\
66                 <%zipcode%> <%city%>\strut\\
67                 <%country%> \strut
68         }
69
70 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
71 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
72 \opening{
73         \Ifstr{<%cp_name%>}{}
74                 {<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
75                 {
76                         \Ifstr{<%cp_gender%>}{f}
77                                 {\anredefrau}
78                                 {\anredeherr}
79                                 <%cp_title%> <%cp_name%>,
80                 }
81         }
82 \thispagestyle{kivitendo.letter.first}
83
84
85 \gutschriftformel
86
87 \begin{PricingTabular*}%
88 % eigentliche Tabelle%
89 \FakeTable{%
90         <%foreach number%>%
91                 <%runningnumber%> &%
92                 <%number%> &%
93                 \textbf{<%description%>}%
94                 <%if longdescription%>\ExtraDescription{<%longdescription%>}<%end longdescription%>%
95                 <%if serialnumber%>\ExtraDescription{\seriennummer: <%serialnumber%>}<%end serialnumber%>%
96                 <%if ean%>\ExtraDescription{\ean: <%ean%>}<%end ean%>%
97                 <%if projectnumber%>\ExtraDescription{\projektnummer: <%projectnumber%>}<%end projectnumber%>%
98                 &%
99                 <%qty%> <%unit%> &%
100                 <%sellprice%>&%
101                 \Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
102                 <%linetotal%>\tabularnewline%
103         <%end number%>%
104         }%
105         \begin{PricingTotal}%
106                 % Tabellenende letzte Seite
107                 \nettobetrag & <%subtotal%>\\%
108                 <%foreach tax%>%
109                 <%taxdescription%> & <%tax%>\\%
110                 <%end tax%>%
111                 \bfseries\schlussbetrag &  \bfseries <%ordtotal%>\\%
112         \end{PricingTotal}%
113 \end{PricingTabular*}
114
115 <%if notes%>%
116 <%notes%>%
117 \medskip
118 <%end if%>%
119
120 \closing{\gruesse}
121
122 \end{letter}
123
124 \end{document}