1\documentclass[twoside]{scrartcl}
2\usepackage[frame]{xy}
3\usepackage[frenchb]{babel}
4\usepackage[latin1]{inputenc}
5\usepackage{tabularx}
6\setlength{\voffset}{0.5cm}
7\setlength{\hoffset}{-2.0cm}
8\setlength{\topmargin}{0cm}
9\setlength{\headheight}{0.5cm}
10\setlength{\headsep}{1cm}
11\setlength{\topskip}{0pt}
12\setlength{\oddsidemargin}{1.0cm}
13\setlength{\evensidemargin}{1.0cm}
14\setlength{\textwidth}{19.2cm}
15\setlength{\textheight}{24.5cm}
16\setlength{\footskip}{1cm}
17\setlength{\parindent}{0pt}
18\renewcommand{\baselinestretch}{1}
19\begin{document}
20
21\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
22
23\newsavebox{\hdr}
24\sbox{\hdr}{
25  \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
26
27  \parbox{\textwidth}{
28    \parbox[b]{12cm}{
29      <%company%>
30
31      <%address%>}\hfill
32    \begin{tabular}[b]{rr@{}}
33    T�l�phone & <%tel%>\\
34    T�l�copieur & <%fax%>
35    \end{tabular}
36
37    \rule[1.5ex]{\textwidth}{0.5pt}
38  }
39}
40
41\fontfamily{cmss}\fontshape{n}\selectfont
42
43\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
44
45\pagestyle{myheadings}
46%\thispagestyle{empty}     use this with letterhead paper
47
48<%pagebreak 65 27 37%>
49\end{tabular*}
50
51  \rule{\textwidth}{2pt}
52
53  \hfill
54  \begin{tabularx}{7cm}{Xr@{}}
55  \textbf{Sous-total} & \textbf{<%sumcarriedforward%>} \\
56  \end{tabularx}
57
58\newpage
59
60\markright{<%company%>\hfill <%invnumber%>}
61
62\vspace*{-12pt}
63
64\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
65  \textbf{Num�ro} & \textbf{Description} & \textbf{Qt�} &
66    \textbf{Unit�} & \textbf{Prix} & \textbf{Remise} & \textbf{Montant} \\
67  & report� de la page <%lastpage%> & & & & & <%sumcarriedforward%> \\
68<%end pagebreak%>
69
70
71\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
72
73\vspace*{2cm}
74
75<%name%>
76
77<%address1%>
78
79<%if address2%>
80<%address2%>
81<%end address2%>
82
83<%city%> <%state%> <%zipcode%>
84
85<%if country%>
86<%country%>
87<%end country%>
88
89\vspace{3.5cm}
90
91\textbf{F A C T U R E}
92\hfill
93\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
94  \textbf{Date de facturation} & <%invdate%> \\
95  \textbf{Num�ro de facture} & <%invnumber%> \\
96  \textbf{Num�ro de client} & <%customer_id%>
97\end{tabular}
98
99\vspace{1cm}
100
101\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
102  \textbf{Num�ro} & \textbf{Description} & \textbf{Qt�} &
103    \textbf{Unit�} & \textbf{Prix} & \textbf{Remise} & \textbf{Montant} \\
104<%foreach number%>
105  <%number%> & <%description%> & <%qty%> &
106    <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
107<%end number%>
108\end{tabular*}
109
110
111\parbox{\textwidth}{
112\rule{\textwidth}{2pt}
113
114\vspace{0.2cm}
115
116\hfill
117\begin{tabularx}{7cm}{Xr@{}}
118  \textbf{Sous-total} & \textbf{<%subtotal%>} \\
119<%foreach tax%>
120  <%taxdescription%> de <%taxbase%> & <%tax%>\\
121<%end tax%>
122  \hline
123  \textbf{Total} & \textbf{<%total%>}\\
124\end{tabularx}
125
126\vspace{0.3cm}
127
128\hfill
129  Tous les prix indiqu�s sont en \textbf{<%currency%>}.
130
131\vspace{12pt}
132
133<%if notes%>
134  <%notes%>
135<%end if%>
136
137}
138
139\vfill
140\centerline{\textbf{Merci de faire affaire avec nous!}}
141
142\renewcommand{\thefootnote}{\fnsymbol{footnote}}
143
144\footnotetext[1]{\tiny
145Le paiement doit �tre acquitt� au plus tard <%terms%> jours � partir de
146la date de facturation. Des int�r�ts seront per�us � raison de 1.5\% par
147mois apr�s <%duedate%> jusqu'� ce que le paiement soit complet. Les
148�l�ments retourn�s seront sujets � un suppl�ment de remmagasinnage de
14910\%. Une autorisation de renvoi doit �tre obtenue au pr�alable aupr�s de
150<%company%>. Les frais de transports et d'assurance sur les �l�ments
151retourn�s devront �tre couvert par le client de fa�on appropri�e.
152<%company%> ne peut �tre tenue responsable des dommages survenus pendant
153le transit.}
154
155\end{document}
156