%% file: Standard Multipage.tex %% Purpose: Multipage bill template for e-Bills %% %% Created by Mark Asplen-Taylor %% Asplen Management Ltd %% www.asplen.co.uk %% %% Modified for Freeside by Ivan Kohler %% %% Changes %% 0.1 4/12/00 Created %% 0.2 18/10/01 More fields added %% 1.0 16/11/01 RELEASED %% 1.2 16/10/02 Invoice number added %% 1.3 2/12/02 Logo graphic added %% 1.4 7/2/03 Multipage headers/footers added %% n/a 10/12/03 forked for Freeside; checked into CVS %% \documentclass[letterpaper]{article} \usepackage{fancyhdr,lastpage,ifthen,longtable,afterpage} \usepackage{graphicx} % required for logo graphic \addtolength{\voffset}{-0.0in} % top margin to top of header \addtolength{\hoffset}{-0.60in} %left margin on page \addtolength{\topmargin}{-0.6in} % top margin to top of header \setlength{\headheight}{1in} % height of header \setlength{\headsep}{0.5in} % between header and text \addtolength{\textheight}{-0.4in} % height of main text \addtolength{\textheight}{-0.5in} % height of main text \setlength{\footskip}{0.5in} % bottom of footer from bottom of text \addtolength{\textwidth}{2.1in} % width of text \setlength{\oddsidemargin}{0in} % odd page left margin \setlength{\evensidemargin}{0in} % even page left margin \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{1pt} % New command for address lines i.e. skip them if blank \newcommand{\addressline}[1]{\ifthenelse{\equal{#1}{}}{}{#1\newline}} \newcommand{\dollar}[1][]{\symbol{36}} % Inserts dollar symbol \pagestyle{fancy} %% Font options are: %% bch Bitsream Charter %% put Utopia %% phv Adobe Helvetica %% pnc New Century Schoolbook %% ptm Times %% pcr Courier \renewcommand{\familydefault}{phv} \begin{document} % %% Headers and footers defined for the first page \fancyfoot[CO,CE]{\small{ \begin{tabular}{c} $footer \end{tabular}}} % %% The LH Heading comprising logo %% UNCOMMENT the following FOUR lines and change the path if necssary to provide a logo \fancyhead[LO,LE]{ \begin{tabular}{l} \includegraphics{/usr/local/etc/freeside/conf.DBI:Pg:dbname=freeside/logo.eps} \end{tabular}} % %% The Heading comprising isue date, customer ref & INVOICE name \fancyhead[RO,RE]{ \begin{tabular}{rcl} Invoice date & & Invoice number \\ \vspace{0.2cm} \textbf{$date} & & \textbf{$invnum} \\\hline \rule{0pt}{5ex} &~~ \huge{\textsc{Invoice}}& \\ \vspace{-0.2cm} & & \\\hline \end{tabular}} % %% Header & footer changes for subsequent pages % \afterpage{ \fancyfoot[RO,RE]{\small{\thepage\ of \pageref{LastPage}}} } \afterpage{ \fancyfoot[CO,CE]{\small{$smallfooter}} } \afterpage{ \fancyhead[LO,LE]{\small{}} } \afterpage{ \fancyhead[RO,RE]{\small{ \begin{tabular}{ll} Invoice date & Invoice number\\ \textbf{$date} & \textbf{$invnum}\\ \end{tabular}}} } % % \makebox{ \begin{minipage}[t]{2.9in} \vspace{0.20in} \textbf{$payname}\\ \addressline{$company} \addressline{$address1} \addressline{$address2} \addressline{$city, $state $zip} \addressline{$country} \end{minipage}} \hfill \makebox{ \begin{minipage}[t]{2.5in} \begin{flushright} Terms: $terms\\ $po_line\\ \end{flushright} \end{minipage}} \vspace{0.5cm} % \section*{\textsc{Charges}} \begin{longtable}{|c|l|c|r|r|} \hline \rule{0pt}{2.5ex} \makebox[1.4cm]{\textbf{Ref}} & \makebox[7.9cm][l]{\textbf{Description}} & \makebox[1.3cm][c]{\textbf{Quantity}} & \makebox[2.5cm][r]{\textbf{Unit Price}} & \makebox[2.5cm][r]{\textbf{Amount}} \\ \hline \endfirsthead \multicolumn{5}{r}{\rule{0pt}{2.5ex}Continued from previous page}\\ \hline \rule{0pt}{2.5ex} \makebox[1.4cm]{\textbf{Ref}} & \makebox[7.9cm][l]{\textbf{Description}} & \makebox[1.3cm][c]{\textbf{Quantity}} & \makebox[2.5cm][r]{\textbf{Unit Price}} & \makebox[2.5cm][r]{\textbf{Amount}} \\ \hline \endhead \multicolumn{5}{r}{\rule{0pt}{2.5ex}/cont...}\\ \endfoot %%TotalDetails & \multicolumn{3}{l}{$total_item} & $total_amount\\ %%EndTotalDetails \hline \endlastfoot %%Detail \rule{0pt}{2.5ex}$ref & \begin{tabular}{l} $description\tabularnewline \end{tabular} & $quantity & \dollar $amount & \dollar $amount\\\hline %%EndDetail \end{longtable} \vfill $notes \end{document}