<?lsmb FILTER latex { format=FORMAT _ "(xelatex)" } -?>
\documentclass{scrartcl}
 \usepackage{xltxtra}
 \usepackage{fontspec}
 \setmainfont{LiberationSans-Regular.ttf}
\usepackage{tabularx}
\usepackage[letterpaper,top=2cm,bottom=1.5cm,left=1.1cm,right=1.5cm]{geometry}
\usepackage{graphicx}

\begin{document}

<?lsmb FOREACH statement IN statements ?>
\pagestyle{myheadings}
\thispagestyle{empty}

<?lsmb INCLUDE letterhead ?>

\parbox[t]{.5\textwidth}{
<?lsmb statement.entity.name ?>

<?lsmb statement.address.line_one ?>
<?lsmb statement.address.city ?> <?lsmb statement.address.state ?>
<?lsmb statement.address.mail_code ?>
}
\hfill

\vspace{1cm}

\textbf{\MakeUppercase{<?lsmb text('Statement') ?>}} \hfill
\textbf{<?lsmb statementdate ?>}

\vspace{2cm}

\begin{tabular*}{\textwidth}{|ll@{\extracolsep\fill}ccrrrr|}
  \hline
  \textbf{<?lsmb text('Invoice #') ?>} & \textbf{<?lsmb text('Order #') ?>}
  & \textbf{<?lsmb text('Date') ?>} & \textbf{<?lsmb text('Due') ?>} &
  \textbf{<?lsmb text('Current') ?>} & \textbf{30} & \textbf{60} & \textbf{90} \\
  \hline
<?lsmb FOREACH invoice IN statement.aging.rows ?>
  <?lsmb invoice.invnumber ?> &
  <?lsmb invoice.ordnumber ?> &
  <?lsmb invoice.invdate ?> &
  <?lsmb invoice.duedate ?> &
  <?lsmb invoice.c0 ?> &
  <?lsmb invoice.c30 ?> &
  <?lsmb invoice.c60 ?> &
  <?lsmb invoice.c90 ?> \\
<?lsmb END ?>
\hline
 & & & &
 <?lsmb statement.aging.c0total ?> &
 <?lsmb statement.aging.c30total ?> &
 <?lsmb statement.aging.c60total ?> &
 <?lsmb statement.aging.c90total ?> \\
\hline
\end{tabular*}

\vspace{0.5cm}

\hfill
\pagebreak
<?lsmb END ?>
\end{document}
<?lsmb END ?>
