1 %% file: Standard Multipage.tex
\r
2 %% Purpose: Multipage bill template for e-Bills
\r
4 %% Created by Mark Asplen-Taylor
\r
5 %% Asplen Management Ltd
\r
8 %% Modified for Freeside by Kristian Hoffman
\r
11 %% 0.1 4/12/00 Created
\r
12 %% 0.2 18/10/01 More fields added
\r
13 %% 1.0 16/11/01 RELEASED
\r
14 %% 1.2 16/10/02 Invoice number added
\r
15 %% 1.3 2/12/02 Logo graphic added
\r
16 %% 1.4 7/2/03 Multipage headers/footers added
\r
17 %% n/a forked for Freeside; checked into CVS
\r
20 \documentclass[letterpaper]{article}
\r
22 \usepackage{fancyhdr,lastpage,ifthen,array,longtable,afterpage,caption,multirow,bigstrut}
\r
23 \usepackage{graphicx} % required for logo graphic
\r
24 \usepackage[utf8]{inputenc} % multilanguage support
\r
25 \usepackage[T1]{fontenc}
\r
28 \addtolength{\voffset}{-0.0cm} % top margin to top of header
\r
29 \addtolength{\hoffset}{-0.6cm} % left margin on page
\r
30 \addtolength{\topmargin}{-1.25cm}
\r
31 \setlength{\headheight}{2.0cm} % height of header
\r
32 \setlength{\headsep}{1.0cm}
\r
33 \setlength{\footskip}{1.0cm} % bottom of footer from bottom of text
\r
35 %\addtolength{\textwidth}{2.1in} % width of text
\r
36 \setlength{\textwidth}{19.5cm}
\r
37 \setlength{\textheight}{19.5cm}
\r
38 \setlength{\oddsidemargin}{-0.9cm} % odd page left margin
\r
39 \setlength{\evensidemargin}{-0.9cm} % even page left margin
\r
43 \renewcommand{\headrulewidth}{0pt}
\r
44 \renewcommand{\footrulewidth}{1pt}
\r
46 \renewcommand{\footrule}{
\r
47 \ifthenelse{\equal{\thepage}{1}}
\r
51 \vbox to 0pt{\rule{\headwidth}{\footrulewidth}\vss}
\r
55 \newcommand{\extracouponspace}{3.6cm}
\r
57 % Adjust the inset of the mailing address
\r
58 \newcommand{\addressinset}[1][]{\hspace{1.0cm}}
\r
60 % Adjust the inset of the return address and logo
\r
61 \newcommand{\returninset}[1][]{\hspace{-0.25cm}}
\r
63 % New command for address lines i.e. skip them if blank
\r
64 \newcommand{\addressline}[1]{\ifthenelse{\equal{#1}{}}{}{#1\\}}
\r
66 % Inserts dollar symbol
\r
67 \newcommand{\dollar}[1][]{\symbol{36}}
\r
69 % Remove plain style header/footer
\r
70 \fancypagestyle{plain}{
\r
75 % Define fancy header/footer for first and subsequent pages
\r
77 \ifthenelse{\equal{\thepage}{1}}
\r
79 \vspace{-\extracouponspace}\rule[0.5em]{\textwidth}{\footrulewidth}\\Detach and return this remittance form with your payment.\\
\r
84 \makebox{ \includegraphics{/usr/local/etc/freeside/cache.DBI:Pg:dbname=freeside/cust_bill.681.XoeuvJBe.eps}} &
\r
85 \begin{minipage}[b]{5.5cm}
\r
86 Freeside Test 5.0.1\\*
88 Exampleton, CA~~54321\\*
\r
91 \begin{tabular}{r@{: }lr}
\r
92 Invoice date & \textbf{Dec~26th,~2015} & \multirow{4}*{
\r
94 \begin{minipage}[t]{7.0cm}
\r
95 \textbf{Samara Towne}\\
\r
96 \addressline{Olson Inc}
\r
97 \addressline{46706 Kadin Hill \#780}
\r
98 \addressline{Trailer W 2-E}
\r
99 \addressline{Owensboro, KS~~69113}
\r
103 Customer\#& \textbf{135} & \\
\r
104 Total Due & \textbf{0.00} & \\
\r
105 \rule{0pt}{2.25em}Amount Enclosed & \rule{2cm}{1pt}& \\
\r
107 \rule{0pt}{1cm} &\\
\r
109 \begin{tabular}{ll}
\r
110 \addressinset \rule{0.5cm}{0cm} &
\r
112 \begin{minipage}[t]{7.0cm}
\r
113 Freeside Test 5.0.1\\*
115 Exampleton, CA~~54321\\*
\r
119 \end{tabular}\\
\r \small{
\r
120 Freeside Test 5.0.1
\r
121 }\vspace{\extracouponspace}
\r
125 Freeside Test 5.0.1
\r
131 \ifthenelse{\equal{\thepage}{1}}
\r
135 \small{\thepage\ of \pageref{LastPage}}
\r
140 \ifthenelse{\equal{\thepage}{1}}
\r
144 \begin{tabular}{ll}
\r
145 \includegraphics{/usr/local/etc/freeside/cache.DBI:Pg:dbname=freeside/cust_bill.681.XoeuvJBe.eps} &
\r
146 \begin{minipage}[b]{5.5cm}
\r
147 Freeside Test 5.0.1\\*
149 Exampleton, CA~~54321\\*
\r
155 %\includegraphics{/usr/local/etc/freeside/cache.DBI:Pg:dbname=freeside/cust_bill.681.XoeuvJBe.eps} % Uncomment if you want the logo on all pages.
\r
160 \ifthenelse{\equal{\thepage}{1}}
\r
162 \begin{tabular}{ccc}
\r
163 Invoice date & Invoice \# & Customer \#\\
\r
165 \textbf{Dec~26th,~2015} & \textbf{681} & \textbf{135} \\\hline
\r
166 \rule{0pt}{5ex} &~~ \huge{\textsc{Invoice}} & \\
\r
173 \begin{tabular}{lll}
\r
174 Invoice date & Invoice \# & Customer \#\\
\r
175 \textbf{Dec~26th,~2015} & \textbf{681} & \textbf{135}\\
\r
184 %% Font options are:
\r
185 %% bch Bitsream Charter
\r
187 %% phv Adobe Helvetica
\r
188 %% pnc New Century Schoolbook
\r
192 \renewcommand{\familydefault}{phv}
\r
195 % Commands for freeside table header...
\r
197 \newcommand{\FSdescriptionlength} { 8.2cm }
\r
198 \newcommand{\FSdescriptioncolumncount} { 4 }
\r
199 \newcommand{\FSunitcolumns}{ \makebox[2.5cm][r]{\textbf{~~Unit Price}} &\makebox[1.4cm]{\textbf{~Quantity}} & }
\r
201 \newcommand{\FShead}{
\r
204 \makebox[1.4cm]{} &
\r
205 \multicolumn{\FSdescriptioncolumncount}{l}{\makebox[\FSdescriptionlength][l]{\textbf{Description}}}&
\r
207 \makebox[1.6cm][r]{\textbf{Amount}} \\
\r
211 % ...description...
\r
212 \newcommand{\FSdesc}[5]{
\r
213 \multicolumn{1}{c}{\rule{0pt}{2.5ex}\textbf{#1}} &
\r
214 \multicolumn{4}{l}{\textbf{#2}} &
\r
215 \multicolumn{1}{r}{\textbf{#3}} &
216 \multicolumn{1}{r}{\textbf{#4}} &
218 \multicolumn{1}{r}{\textbf{#5}}\\
\r
220 % ...extended description...
\r
221 \newcommand{\FSextdesc}[1]{
\r
222 \multicolumn{1}{l}{\rule{0pt}{1.0ex}} &
\r
223 %% \multicolumn{2}{l}{\small{~-~#1}}\\
\r
226 % ...and total line items.
\r
227 \newcommand{\FStotaldesc}[2]{
\r
228 & \multicolumn{6}{l}{#1} & #2\\
\r
233 % Headers and footers defined for the first page
\r
234 \addressinset \rule{0.5cm}{0cm}
\r
236 \begin{minipage}[t]{7.0cm}
\r
238 \textbf{Samara Towne}\\
\r
239 \addressline{Olson Inc}
\r
240 \addressline{46706 Kadin Hill \#780}
\r
241 \addressline{Trailer W 2-E}
\r
242 \addressline{Owensboro, KS~~69113}
\r
247 \begin{minipage}[t]{6.4cm}
\r
259 \captionsetup{singlelinecheck=false,justification=raggedright,font={Large,sc,bf}}\ifthenelse{\equal{\thepage}{1}}{\setlength{\LTextracouponspace}{\extracouponspace}}{\setlength{\LTextracouponspace}{0pt}}\begin{longtable}{cllllllr}\caption*{ Charges}\\\FShead\endfirsthead\multicolumn{7}{r}{\rule{0pt}{2.5ex}Continued from previous page}\\\FShead\endhead\multicolumn{7}{r}{\rule{0pt}{2.5ex}Continued on next page...}\\\endfoot\hline\FStotaldesc{\textbf{Total Charges}}{\textbf{\dollar 142.42}}
260 \FStotaldesc{Payment received 12/26/15}{$-$\dollar 142.42}
261 \FStotaldesc{\textbf{Balance Due}}{\textbf{\dollar 0.00}}
262 \hline\endlastfoot\hline
263 \FSdesc{}{Monthly prorated broadband Setup}{\dollar40.00}{1}{\dollar40.00}*
264 \FSextdesc{\multicolumn{6}{l}{\small{~~~Test svc\_broadband: IP:10.98.22.188, MAC:00007E436BF5}}}*
265 \FSdesc{}{Monthly prorated broadband (12/26/15 - 01/01/16)}{\dollar90.00}{1}{\dollar17.42}*
266 \FSextdesc{\multicolumn{6}{l}{\small{~~~Test svc\_broadband: IP:10.98.22.188, MAC:00007E436BF5}}}*
267 \FSextdesc{\multicolumn{6}{l}{\small{~~~Prorated (Dec 26 - Jan 01): \$17.42}}}*
269 \FSdesc{}{Annual subscription domain (12/26/15 - 12/01/16)}{\dollar25.00}{1}{\dollar25.00}*
270 \FSextdesc{\multicolumn{6}{l}{\small{~~~Test svc\_domain: botsford-mueller.com}}}*
272 \FSdesc{}{Monthly anniversary phone x4 (12/26/15 - 01/26/16)}{\dollar60.00}{1}{\dollar60.00}*
273 \FSextdesc{\multicolumn{6}{l}{\small{~~~Test svc\_phone: 152300260278657}}}*
276 \begin{minipage}[t]{\textwidth}
\r
278 %% Add any customer specific notes in here
280 \section*{\textsc{Notes}}
282 \item Please make your check payable to \textbf{Freeside Test 5.0.1}.
283 \item If you have any questions please email or telephone.
285 \ifthenelse{\equal{\thepage}{1}}{\rule{0pt}{\extracouponspace}}{}
\r