-
Notifications
You must be signed in to change notification settings - Fork 2
/
invoice_template.tex
63 lines (52 loc) · 1.9 KB
/
invoice_template.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
\documentclass[paper=a4,fontsize=11pt,DIV=12]{scrlttr2}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[gen]{eurosym}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage{microtype}
\usepackage{dcolumn}
\usepackage{booktabs}
\usepackage[english]{babel}
\LoadLetterOption{DINmtext}
\KOMAoptions{enlargefirstpage=true,fromalign=right,fromphone=true,fromemail=true,backaddress=true,parskip=half*}
\setkomavar{fromname}{Kleopatra}
\setkomavar{fromaddress}{%
Brucheion\\
Alexandria
}
\setkomavar{fromphone}{+987654321}
\setkomavar{fromemail}{[email protected]}
\begin{document}
\begin{letter}{To\\
@{owner['full_name']}\\
%+ for a in owner['address']:
@{a}\\
%-
}
\setkomavar{subject}{%
@{notes}}
\setkomavar{invoice}{@{id}}
\opening{Dear user of gcinvoice,}
this invoice template demonstrates some features of gcinvoice, and is also used
by the test suite.
The \emph{special discount} demonstrates that arbitrary python expressions can be
used.
It also shows how to calculate and format numbers.
Prices are in €.
\begin{tabular}[t]{D{,}{,}{2}p{22em}D{,}{,}{2}D{,}{,}{2}D{,}{,}{2}D{,}{,}{2}}
\multicolumn{1}{c}{Quantity} & Item & \multicolumn{1}{c}{Price} &
\multicolumn{1}{c}{Discount} & \multicolumn{1}{c}{Taxes} & \multicolumn{1}{c}{Amount}\\ \midrule
%+ for e in entries:
@{e['qty']} & @{e['description']} & @{e['price']} & @{e['amount_discount']} & @{e['amount_taxes']} & @{e['amount_net']} \\
%-
\midrule
& Net amount & & & & @{amount_net}\\
& + Taxes & & & & @{amount_taxes} \\ \cmidrule{6-6}
& Gross amount & & & & @{amount_gross} \\
& \multicolumn{2}{l}{my special discount (not in Gnucash)} & & & @{cformat(Decimal('0.1') * amount_net_)} \\ \cmidrule{6-6}
& Final amount & & & & @{cformat(amount_gross_ - Decimal('0.1') * amount_net_)}
\end{tabular}
\closing{Best Regards}
\end{letter}
\end{document}