so Search.tsf and Search.rdf work
[freeside.git] / sql-ledger / templates / Norwegian-invoice.tex
1 \documentclass[twoside]{scrartcl}
2 \usepackage[frame]{xy}
3 \usepackage{tabularx}
4 \usepackage[latin1]{inputenc}
5 \setlength{\voffset}{0.5cm}
6 \setlength{\hoffset}{-2.0cm}
7 \setlength{\topmargin}{0cm}
8 \setlength{\headheight}{0.5cm}
9 \setlength{\headsep}{1cm}
10 \setlength{\topskip}{0pt}
11 \setlength{\oddsidemargin}{1.0cm}
12 \setlength{\evensidemargin}{1.0cm}
13 \setlength{\textwidth}{19.2cm}
14 \setlength{\textheight}{24.5cm}
15 \setlength{\footskip}{1cm}
16 \setlength{\parindent}{0pt}
17 \renewcommand{\baselinestretch}{1}
18 \begin{document}
19
20 \newlength{\descrwidth}\setlength{\descrwidth}{10cm}
21
22 \newsavebox{\hdr}
23 \sbox{\hdr}{
24   \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
25
26   \parbox{\textwidth}{
27     \parbox[b]{12cm}{
28       <%company%>
29       
30       <%address%>}\hfill
31     \begin{tabular}[b]{rr@{}}
32     Telefon & <%tel%>\\
33     Telefaks & <%fax%>
34     \end{tabular}
35
36     \rule[1.5ex]{\textwidth}{0.5pt}
37   }
38 }
39     
40 \fontfamily{cmss}\fontshape{n}\selectfont
41
42 \markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
43
44 \pagestyle{myheadings}
45 %\thispagestyle{empty}     use this with letterhead paper
46
47 <%pagebreak 90 27 48%>
48 \end{tabular*}
49
50   \rule{\textwidth}{2pt}
51   
52   \hfill
53   \begin{tabularx}{7cm}{Xr@{}}
54   \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
55   \end{tabularx}
56
57 \newpage
58
59 \markright{<%company%>\hfill <%invnumber%>}
60
61 \vspace*{-12pt}
62
63 \begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
64   \textbf{Nummer} & \textbf{Beskrivelse} & \textbf{Ant.} &
65     \textbf{Enhet} & \textbf{Pris} & \textbf{Rabatt} & \textbf{Sum} \\
66   & carried forward from page <%lastpage%> & & & & & <%sumcarriedforward%> \\
67 <%end pagebreak%>
68
69
70 \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
71
72 \vspace*{0.5cm}
73
74 \parbox[t]{1cm}{\hfill}
75   \parbox[t]{10.5cm}{
76   \textbf{Til}
77   \vspace{0.5cm}
78
79 <%name%>
80
81 <%address1%>
82
83 <%if address2%>
84 <%address2%>
85 <%end address2%>
86
87 <%city%> <%state%> <%zipcode%>
88
89 <%if country%>
90 <%country%>
91 <%end country%>
92
93 \vspace{0.3cm}
94
95 %<%if contact%>
96 %Attn: <%contact%>
97 %\vspace{0.3cm}
98 %<%end contact%>
99 \vspace{0.5cm}
100
101 <%if customerphone%>
102 Tel: <%customerphone%>
103 <%end customerphone%>
104
105 <%if customerfax%>
106 Faks: <%customerfax%>
107 <%end customerfax%>
108
109 <%email%>
110 }
111 \parbox[t]{7.5cm}{
112 \textbf{Leveringsadresse}
113 \vspace{0.5cm}
114
115 <%shiptoname%>
116
117 <%shiptoaddress1%>
118
119 <%if shiptoaddress2%>
120 <%shiptoaddress2%>
121 <%end shiptoaddress2%>
122
123 <%shiptocity%> <%shiptostate%> <%shiptozipcode%>
124
125 <%if shiptocountry%>
126 <%shiptocountry%>
127 <%end shiptocountry%>
128
129 \vspace{0.3cm}
130
131 \vspace{0.3cm}
132
133 <%if shiptocontact%>
134 Attn: <%shiptocontact%>
135 \vspace{0.3cm}
136 <%end shiptocontact%>
137
138 <%if shiptophone%>
139 Tel.: <%shiptophone%>
140 <%end shiptophone%>
141
142 <%if shiptofax%>
143 Faks: <%shiptofax%>
144 <%end shiptofax%>
145
146 <%shiptoemail%>
147 }
148 \hfill
149
150 \vspace{1cm}
151
152 \textbf{F A K T U R A}
153 \hfill
154
155 \vspace{1cm}
156
157 \begin{tabular}[t]{l@{\hspace{0.3cm}}l}
158   \textbf{Dato} & <%invdate%> \\
159   \textbf{Fakturanr.} & <%invnumber%> \\
160   \textbf{Ordrenr.} & <%ordnumber%> \\
161   \textbf{Kontakt} & <%employee%>
162 \end{tabular}
163
164 \vspace{1cm}
165
166 \begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
167   \textbf{Nummer} & \textbf{Beskrivelse} & \textbf{Ant.} &
168     \textbf{Enhet} & \textbf{Pris} & \textbf{Rabatt} & \textbf{Sum} \\
169 <%foreach number%>
170   <%number%> & <%description%> & <%qty%> &
171     <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
172 <%end number%>
173 \end{tabular*}
174
175
176 \parbox{\textwidth}{
177 \rule{\textwidth}{2pt}
178
179 \vspace{0.2cm}
180
181 \hfill
182 \begin{tabularx}{7cm}{Xr@{}}
183   \textbf{Subtotal} & \textbf{<%subtotal%>} \\
184 <%foreach tax%>
185   <%taxdescription%> on <%taxbase%> & <%tax%> \\
186 <%end tax%>
187 <%if paid%>
188   \textbf{Betalt} & - <%paid%> \\
189 <%end paid%>
190   \hline
191   \textbf{Skyldig} & \textbf{<%total%>} \\
192 \end{tabularx}
193
194 \vspace{0.3cm}
195
196 \hfill
197   Alle priser i \textbf{<%currency%>} valuta.
198
199 \vspace{12pt}
200
201 <%if notes%>
202   <%notes%>
203 <%end if%>
204
205 }
206
207 \vfill
208
209 <%if paid%>
210 \begin{tabularx}{10cm}{@{}lXlr@{}}
211   \textbf{Innbetalinger} & & & \\
212   \hline
213   \textbf{Dato} & \textbf{Konto} & \textbf{Kilde} & \textbf{Sum} \\
214 <%end paid%>
215 <%foreach payment%>
216   <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%payment%> \\
217 <%end payment%>
218 <%if paid%>
219 \end{tabularx}
220 <%end paid%>
221
222 \vspace{1cm}
223
224 \centerline{\textbf{Takk for handelen!}}
225
226 \renewcommand{\thefootnote}{\fnsymbol{footnote}}
227
228 \footnotetext[1]{\tiny
229 Betalingen må betales innen <%terms%> dager fra fakturadato. Ved
230 forsinket betaling belastes en månedlig rente på 1.5\% per måned,
231 fra <%duedate%> inntil betalingen er fullstendig. Varer som returneres
232 belastes med 10\% returgebyr. Retur må forhåndsgodkjennes fra
233 <%company%> før varene returneres. Retur må sendes forhåndsbetalt og
234 må være forsikret. <%company%> er ikke ansvarlig for transportskader.
235 }
236
237 \end{document}