Revision f8d1b96b
Von Marei Peischl vor fast 5 Jahren hinzugefügt
invoice.tex | ||
---|---|---|
15 | 15 |
\ourhead{\kundennummer}{<%customernumber%>}{\rechnung}{<%invnumber%>}{<%invdate%>} |
16 | 16 |
|
17 | 17 |
|
18 |
\begin{document} |
|
19 |
|
|
20 |
test: <%iccvar_test%> |
|
21 |
|
|
22 |
|
|
23 |
pflicht: <%iccvar_pflicht%> |
|
24 |
|
|
25 |
|
|
26 |
testware: <%iccvar_test_ware%> |
|
27 |
|
|
28 |
|
|
29 |
\ourfont |
|
30 |
\begin{minipage}[t]{8cm} |
|
31 |
\scriptsize |
|
32 |
|
|
33 |
{\color{gray}\underline{\firma\ $\cdot$ \strasse\ $\cdot$ \ort}} |
|
34 |
\normalsize |
|
35 |
|
|
36 |
\vspace*{0.3cm} |
|
37 |
|
|
38 |
<%name%> |
|
39 |
|
|
40 |
<%if department_1%><%department_1%><%end if%> |
|
41 |
|
|
42 |
<%if department_2%><%department_2%><%end if%> |
|
43 |
|
|
44 |
<%cp_givenname%> <%cp_name%> |
|
45 |
|
|
46 |
<%street%> |
|
47 |
|
|
48 |
~ |
|
49 |
|
|
50 |
<%zipcode%> <%city%> |
|
51 |
|
|
52 |
<%country%> |
|
53 |
\end{minipage} |
|
54 |
\hfill |
|
55 |
\begin{minipage}[t]{6cm} |
|
56 |
\hfill{\LARGE\textbf{\rechnung}} |
|
57 |
|
|
58 |
\vspace*{0.2cm} |
|
59 |
|
|
60 |
\hfill{\large\textbf{\nr ~<%invnumber%>}} |
|
61 |
|
|
62 |
\vspace*{0.2cm} |
|
63 |
|
|
64 |
\rechnungsdatum:\hfill <%invdate%> |
|
65 |
|
|
66 |
<%if ordnumber%>\auftragsnummer:\hfill <%ordnumber%> <%end if%> |
|
67 |
|
|
68 |
\kundennummer:\hfill <%customernumber%> |
|
69 |
|
|
70 |
<%if cusordnumber%>\ihreBestellnummer:\hfill <%cusordnumber%><%end if%> |
|
71 |
|
|
72 |
<%if donumber%>\lieferschein~\nr:\hfill <%donumber%><%end if%> |
|
73 |
|
|
74 |
<%if quonumber%>\angebot~\nr:\hfill <%quonumber%><%end if%> |
|
75 |
|
|
76 |
\ansprechpartner:\hfill <%employee_name%> |
|
77 |
|
|
78 |
\textTelefon \hfill <%employee_tel%> |
|
18 |
\begin{letter} |
|
19 |
|
|
20 |
\setkomavar*{date}{\rechnungsdatum} |
|
21 |
|
|
22 |
\setkomavar{date}{<%invdate%>} |
|
23 |
\setkomavar{customer}{<%customernumber%>} |
|
24 |
\setkomavar{fromname}{<%employee_name%>} |
|
25 |
\setkomavar{fromphone}{<%employee_tel%>} |
|
26 |
\setkomavar{fromemail}{<%employee_email%>} |
|
27 |
\setkomavar{title}{ |
|
28 |
\rechnung~ \nr ~<%invnumber%> |
|
29 |
} |
|
30 |
<%if ordnumber%> |
|
31 |
\setkomavar*{myref}{\auftragsnummer} |
|
32 |
\setkomavar{myref}{<%ordnumber%>} |
|
33 |
<%end if%> |
|
34 |
<%if cusordnumber%> |
|
35 |
\setkomavar*{yourref}{\ihreBestellnummer} |
|
36 |
\setkomavar{yourref}{<%cusordnumber%>} |
|
37 |
<%end if%> |
|
38 |
<%if donumber%> |
|
39 |
\setkomavar{delivery}{<%donumber%>} |
|
40 |
<%end if%> |
|
41 |
<%if quonumber%> |
|
42 |
\setkomavar{quote}{<%quonumber%>} |
|
43 |
<%end if%> |
|
79 | 44 |
|
80 |
\textEmail \hfill <%employee_email%> |
|
81 |
\end{minipage} |
|
82 | 45 |
<%if shiptoname%> |
83 |
\vspace{0.8cm} |
|
84 |
\scriptsize \underline{\abweichendeLieferadresse:}\\ |
|
85 |
\normalsize <%shiptoname%> |
|
86 |
|
|
87 |
<%if shiptocontact%> <%shiptocontact%><%end if%> |
|
88 |
|
|
89 |
<%shiptodepartment_1%> |
|
90 |
|
|
91 |
<%shiptodepartment_2%> |
|
92 |
|
|
93 |
<%shiptostreet%> |
|
94 |
|
|
95 |
<%shiptozipcode%> <%shiptocity%> |
|
46 |
\makeatletter |
|
47 |
\begin{lrbox}\shippingAddressBox |
|
48 |
\parbox{\useplength{toaddrwidth}}{ |
|
49 |
\backaddr@format{\scriptsize\usekomafont{backaddress}% |
|
50 |
\strut abweichende Lieferadresse |
|
51 |
} |
|
52 |
\par\smallskip |
|
53 |
\setlength{\parskip}{\z@} |
|
54 |
\par |
|
55 |
\normalsize |
|
56 |
<%shiptoname%>\par |
|
57 |
<%if shiptocontact%> <%shiptocontact%><%end if%>\par |
|
58 |
<%shiptodepartment_1%>\par |
|
59 |
<%shiptodepartment_2%>\par |
|
60 |
<%shiptostreet%>\par |
|
61 |
<%shiptozipcode%> <%shiptocity%> |
|
62 |
} |
|
63 |
\end{lrbox} |
|
64 |
\makeatother |
|
96 | 65 |
<%end if%> |
97 | 66 |
|
98 |
\vspace*{1.5cm}
|
|
67 |
\begin{document}
|
|
99 | 68 |
|
100 |
\hfill |
|
69 |
\begin{letter}{ |
|
70 |
<%name%>\strut\\ |
|
71 |
<%if department_1%><%department_1%>\\<%end if%> |
|
72 |
<%if department_2%><%department_2%>\\<%end if%> |
|
73 |
<%cp_givenname%> <%cp_name%>\strut\\ |
|
74 |
<%street%>\strut\\ |
|
75 |
<%zipcode%> <%city%>\strut\\ |
|
76 |
<%country%> \strut |
|
77 |
} |
|
101 | 78 |
|
102 | 79 |
% Anrede nach Geschlecht unterscheiden |
103 |
\ifthenelse{\equal{<%cp_name%>}{}}{\anrede}{ |
|
104 |
\ifthenelse{\equal{<%cp_gender%>}{f}} |
|
105 |
{\anredefrau}{\anredeherr} <%cp_title%> <%cp_name%>,}\\ |
|
106 |
%\rechnungsformel\\ |
|
80 |
\opening{ |
|
81 |
\ifstr{<%cp_name%>}{} |
|
82 |
{\anrede} |
|
83 |
{ |
|
84 |
\ifstr{<%cp_gender%>}{f} |
|
85 |
{\anredefrau} |
|
86 |
{\anredeherr} |
|
87 |
<%cp_title%> <%cp_name%>, |
|
88 |
} |
|
89 |
} |
|
90 |
\thispagestyle{kivitendo.letter.first} |
|
107 | 91 |
|
108 | 92 |
<%if notes%> |
109 | 93 |
<%notes%> |
94 |
\vspace{0.5cm} |
|
110 | 95 |
<%end if%> |
111 | 96 |
|
112 | 97 |
|
113 |
\vspace{0.5cm} |
|
114 |
|
|
115 |
|
|
116 |
% |
|
117 |
% - longtable kann innerhalb der Tabelle umbrechen |
|
118 |
% - da der Umbruch nicht von Lx-Office kontrolliert wird, kann man keinen |
|
119 |
% Übertrag machen |
|
120 |
% - Innerhalb des Langtextes <%longdescription%> wird nicht umgebrochen. |
|
121 |
% Falls das gewünscht ist, \\ mit \renewcommand umschreiben (siehe dazu: |
|
122 |
% http://www.lx-office.org/uploads/media/Lx-Office_Anwendertreffen_LaTeX-Druckvorlagen-31.01.2011_01.pdf) |
|
123 |
% |
|
124 |
\setlength\LTleft\parindent % Tabelle beginnt am linken Textrand |
|
125 |
\setlength\LTright{0pt} % Tabelle endet am rechten Textrand |
|
126 |
\begin{longtable}{@{}rrp{7cm}@{\extracolsep{\fill}}rrr@{}} |
|
127 |
% Tabellenkopf |
|
128 |
\hline |
|
129 |
\textbf{\position} & \textbf{\artikelnummer} & \textbf{\bezeichnung} & \textbf{\menge} & \textbf{\einzelpreis} & \textbf{\gesamtpreis} \\ |
|
130 |
\hline\\ |
|
131 |
\endhead |
|
132 |
|
|
133 |
% Tabellenkopf erste Seite |
|
134 |
\hline |
|
135 |
\textbf{\position} & \textbf{\artikelnummer} & \textbf{\bezeichnung} & \textbf{\menge} & \textbf{\einzelpreis} & \textbf{\gesamtpreis} \\ |
|
136 |
\hline\\[-0.5em] |
|
137 |
\endfirsthead |
|
138 |
|
|
139 |
% Tabellenende |
|
140 |
\\ |
|
141 |
\multicolumn{6}{@{}r@{}}{\weiteraufnaechsterseite} |
|
142 |
\endfoot |
|
143 | 98 |
|
99 |
\begin{PricingTabular*} |
|
100 |
% eigentliche Tabelle |
|
101 |
\FakeTable{ |
|
102 |
<%foreach number%>% |
|
103 |
<%runningnumber%> &% |
|
104 |
<%number%> &% |
|
105 |
\textbf{<%description%>}% |
|
106 |
<%if longdescription%>\ExtraDescription{<%longdescription%>}<%end longdescription%>% |
|
107 |
<%if serialnumber%>\ExtraDescription{\seriennummer: <%serialnumber%>}<%end serialnumber%>% |
|
108 |
<%if ean%>\ExtraDescription{\ean: <%ean%>}<%end ean%>% |
|
109 |
<%if projectnumber%>\ExtraDescription{\projektnummer: <%projectnumber%>}<%end projectnumber%>% |
|
110 |
&% |
|
111 |
<%qty%> <%unit%> &% |
|
112 |
<%sellprice%>&% |
|
113 |
\ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}% |
|
114 |
<%linetotal%>\tabularnewline |
|
115 |
<%end number%> |
|
116 |
} |
|
117 |
\begin{PricingTotal} |
|
144 | 118 |
% Tabellenende letzte Seite |
145 |
\hline\\ |
|
146 |
\multicolumn{5}{@{}l}{\nettobetrag} & <%subtotal%> \currency\\ |
|
119 |
\nettobetrag & <%subtotal%>\\ |
|
147 | 120 |
<%foreach tax%> |
148 |
\multicolumn{5}{@{}l}{<%taxdescription%>} & <%tax%> \currency\\
|
|
121 |
<%taxdescription%> & <%tax%>\\
|
|
149 | 122 |
<%end tax%> |
150 |
\multicolumn{5}{@{}l}{\textbf{\schlussbetrag}} & \textbf{<%invtotal%>} \currency\\ |
|
151 |
\hline\hline\\ |
|
152 |
\endlastfoot |
|
153 |
|
|
154 |
% eigentliche Tabelle |
|
155 |
<%foreach number%> |
|
156 |
<%runningnumber%> & |
|
157 |
<%number%> & |
|
158 |
\textbf{<%description%>} & |
|
159 |
\raggedleft <%qty%> <%unit%> & |
|
160 |
<%sellprice%> \currency & |
|
161 |
\ifthenelse{\equal{<%p_discount%>}{0}}{}{\sffamily\scriptsize{(-<%p_discount%> \%)}} |
|
162 |
\ourfont{<%linetotal%> \currency} \\* % kein Umbruch nach der ersten Zeile, damit Beschreibung und Langtext nicht getrennt werden |
|
163 |
|
|
164 |
<%if longdescription%> && \scriptsize <%longdescription%>\\<%end longdescription%> |
|
165 |
<%if reqdate%> && \scriptsize \lieferdatum: <%reqdate%>\\<%end reqdate%> |
|
166 |
<%if serialnumber%> && \scriptsize \seriennummer: <%serialnumber%>\\<%end serialnumber%> |
|
167 |
<%if ean%> && \scriptsize \ean: <%ean%>\\<%end ean%> |
|
168 |
<%if projectnumber%> && \scriptsize \projektnummer: <%projectnumber%>\\<%end projectnumber%> |
|
169 |
test: <%ic_cvar_test%>& |
|
170 |
pflicht: <%ic_cvar_pflicht%>& |
|
171 |
testware: <%ic_cvar_test_ware%>& |
|
172 |
&\\ |
|
173 |
\\[-0.8em] |
|
174 |
<%end number%> |
|
175 |
|
|
176 |
\end{longtable} |
|
177 |
|
|
123 |
\bfseries\schlussbetrag & \bfseries <%ordtotal%>\\ |
|
124 |
\end{PricingTotal} |
|
125 |
\end{PricingTabular*} |
|
178 | 126 |
|
179 | 127 |
\vspace{0.2cm} |
180 | 128 |
|
181 |
\ifthenelse{\equal{<%deliverydate%>}{}}{\leistungsdatumGleichRechnungsdatum}{\lieferungErfolgtAm ~<%deliverydate%>.} \\ |
|
129 |
\ifstr{<%deliverydate%>}{}{}{% |
|
130 |
\leistungsdatumGleichRechnungsdatum% |
|
131 |
}{ |
|
132 |
\lieferungErfolgtAm ~<%deliverydate%>. |
|
133 |
}\\ |
|
182 | 134 |
|
183 | 135 |
<%if payment_terms%> |
184 | 136 |
\zahlung ~<%payment_terms%>\\ |
... | ... | |
190 | 142 |
|
191 | 143 |
<%if ustid%>\ihreustid ~<%ustid%>.\\<%end if%> |
192 | 144 |
|
193 |
\ifthenelse{\equal{<%taxzone_id%>}{1}} |
|
194 |
{\steuerfreiEU\\}{} % EU mit USt-ID Nummer |
|
195 |
\ifthenelse{\equal{<%taxzone_id%>}{3}} |
|
196 |
{\steuerfreiAUS\\}{} % Außerhalb EU |
|
145 |
\ifnum<%taxzone_id%>=1 |
|
146 |
\steuerfreiEU\\ % EU mit USt-ID Nummer |
|
147 |
\else |
|
148 |
\ifnum<%taxzone_id%>=3 |
|
149 |
\steuerfreiAUS\\ % Außerhalb EU |
|
150 |
\fi |
|
151 |
\fi |
|
152 |
|
|
153 |
\closing{\gruesse} |
|
154 |
|
|
197 | 155 |
|
198 |
\gruesse \\ \\ \\ |
|
199 |
<%employee_name%> |
|
156 |
\end{letter} |
|
200 | 157 |
|
201 | 158 |
\end{document} |
Auch abrufbar als: Unified diff
invoice -> letter