1\documentclass{scrartcl}
2\usepackage[latin1]{inputenc}
3\usepackage{tabularx}
4\usepackage[letterpaper,top=2cm,bottom=1.5cm,left=1.1cm,right=1.5cm]{geometry}
5\usepackage{graphicx}
6
7\begin{document}
8
9\pagestyle{myheadings}
10\thispagestyle{empty}
11
12\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
13
14<?lsmb include letterhead.tex ?>
15
16\parbox[t]{.5\textwidth}{
17<?lsmb name ?>
18
19<?lsmb address1 ?>
20
21<?lsmb address2 ?>
22
23<?lsmb city ?>
24<?lsmb if state ?>
25\hspace{-0.1cm}, <?lsmb state ?>
26<?lsmb end state ?>
27<?lsmb zipcode ?>
28
29<?lsmb country ?>
30}
31\parbox[t]{.5\textwidth}{
32<?lsmb if customerphone ?>
33Tel: <?lsmb customerphone ?>
34<?lsmb end customerphone ?>
35
36<?lsmb if customerfax ?>
37Fax: <?lsmb customerfax ?>
38<?lsmb end customerfax ?>
39
40<?lsmb email ?>
41}
42\hfill
43
44\vspace{1cm}
45
46\textbf{S T A T E M E N T} \hfill \textbf{<?lsmb statementdate ?>}
47
48\vspace{2cm}
49
50\begin{tabular*}{\textwidth}{|ll@{\extracolsep\fill}ccrrrr|}
51  \hline
52  \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Due} &
53  \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90} \\
54  \hline
55<?lsmb foreach invnumber ?>
56  <?lsmb invnumber ?> & <?lsmb ordnumber ?> & <?lsmb invdate ?> & <?lsmb duedate ?> &
57  <?lsmb c0 ?> & <?lsmb c30 ?> & <?lsmb c60 ?> & <?lsmb c90 ?> \\
58<?lsmb end invnumber ?>
59  \multicolumn{8}{|l|}{\mbox{}} \\
60  \hline
61  \textbf{Subtotal} & & & & <?lsmb c0total ?> & <?lsmb c30total ?> & <?lsmb c60total ?> & <?lsmb c90total ?> \\
62  \hline
63\end{tabular*}
64
65\vspace{0.5cm}
66
67\hfill
68\begin{tabularx}{\textwidth}{Xr@{\hspace{1cm}}r@{}}
69  & \textbf{Total outstanding} & \textbf{<?lsmb total ?>}
70\end{tabularx}
71
72\vfill
73All amounts in \textbf{<?lsmb currency ?>} funds.
74
75Please make check payable to \textbf{<?lsmb company ?>}
76
77\end{document}
78
79