1 --- invoice_latex.old 2005-04-14 01:52:02.000000000 -0700
2 +++ invoice_latex 2005-04-14 02:33:26.000000000 -0700
4 %% Asplen Management Ltd
\r
7 -%% Modified for Freeside by Ivan Kohler
\r
8 +%% Modified for Freeside by Ivan Kohler and Kristian Hoffman
\r
11 %% 0.1 4/12/00 Created
\r
13 %% Headers and footers defined for the first page
\r
14 \fancyfoot[CO,CE]{\small{
\r
20 %% The LH Heading comprising logo
\r
22 \begin{tabular}{rcl}
\r
23 Invoice date & & Invoice number \\
\r
25 -\textbf{$date} & & \textbf{$invnum} \\\hline
\r
26 +\textbf{[@-- $date --@]} & & \textbf{[@-- $invnum --@]} \\\hline
\r
27 \rule{0pt}{5ex} &~~ \huge{\textsc{Invoice}}& \\
\r
31 %% Header & footer changes for subsequent pages
\r
33 \afterpage{ \fancyfoot[RO,RE]{\small{\thepage\ of \pageref{LastPage}}} }
\r
34 -\afterpage{ \fancyfoot[CO,CE]{\small{$smallfooter}} }
\r
35 +\afterpage{ \fancyfoot[CO,CE]{\small{[@-- $smallfooter --@]}} }
\r
36 \afterpage{ \fancyhead[LO,LE]{\small{}} }
\r
37 \afterpage{ \fancyhead[RO,RE]{\small{
\r
39 Invoice date & Invoice number\\
\r
40 -\textbf{$date} & \textbf{$invnum}\\
\r
41 +\textbf{[@-- $date --@]} & \textbf{[@-- $invnum --@]}\\
\r
46 \begin{minipage}[t]{2.9in}
\r
48 -\textbf{$payname}\\
\r
49 -\addressline{$company}
\r
50 -\addressline{$address1}
\r
51 -\addressline{$address2}
\r
52 -\addressline{$city, $state $zip}
\r
53 -\addressline{$country}
\r
54 +\textbf{[@-- $payname --@]}\\
\r
55 +\addressline{[@-- $company --@]}
\r
56 +\addressline{[@-- $address1 --@]}
\r
57 +\addressline{[@-- $address2 --@]}
\r
58 +\addressline{[@-- $city --@], [@-- $state --@] [@-- $zip --@]}
\r
59 +\addressline{[@-- $country --@]}
\r
63 \begin{minipage}[t]{2.5in}
\r
67 +Terms: [@-- $terms --@]\\
\r
68 +[@-- $po_line --@]\\
\r
73 \section*{\textsc{Charges}}
\r
74 -\begin{longtable}{|c|l|c|r|r|}
\r
75 +\begin{longtable}{|c|l|r|}
\r
78 \makebox[1.4cm]{\textbf{Ref}} &
\r
79 -\makebox[7.9cm][l]{\textbf{Description}} &
\r
80 -\makebox[1.3cm][c]{\textbf{Quantity}} &
\r
81 -\makebox[2.5cm][r]{\textbf{Unit Price}} &
\r
82 -\makebox[2.5cm][r]{\textbf{Amount}} \\
\r
83 +\makebox[13cm][l]{\textbf{Description}} &
\r
84 +\makebox[2cm][r]{\textbf{Amount}} \\
\r
87 -\multicolumn{5}{r}{\rule{0pt}{2.5ex}Continued from previous page}\\
\r
88 +\multicolumn{3}{r}{\rule{0pt}{2.5ex}Continued from previous page}\\
\r
91 \makebox[1.4cm]{\textbf{Ref}} &
\r
92 -\makebox[7.9cm][l]{\textbf{Description}} &
\r
93 -\makebox[1.3cm][c]{\textbf{Quantity}} &
\r
94 -\makebox[2.5cm][r]{\textbf{Unit Price}} &
\r
95 -\makebox[2.5cm][r]{\textbf{Amount}} \\
\r
96 +\makebox[13cm][l]{\textbf{Description}} &
\r
97 +\makebox[2cm][r]{\textbf{Amount}} \\
\r
100 -\multicolumn{5}{r}{\rule{0pt}{2.5ex}/cont...}\\
\r
101 +\multicolumn{3}{r}{\rule{0pt}{2.5ex}/cont...}\\
\r
104 - & \multicolumn{3}{l}{$total_item} & $total_amount\\
\r
108 + foreach my $line (@total_items) {
\r
109 + $OUT .= ' & \multicolumn{1}{l}{' . $line->{'total_item'} . '} & ' .
\r
110 + $line->{'total_amount'} . '\\\\' . "\n";
\r
117 -\rule{0pt}{2.5ex}$ref &
\r
118 -\begin{tabular}{l}
\r
119 -$description\tabularnewline
\r
121 -& $quantity & \dollar $amount & \dollar $amount\\\hline
\r
125 + foreach my $line (@detail_items) {
\r
126 + $OUT .= '\rule{0pt}{2.5ex}' . $line->{'ref'} . ' &' . "\n".
\r
127 + '\begin{tabular}{l}' . "\n".
\r
128 + $line->{'description'} . '\tabularnewline' . "\n".
\r
129 + '\end{tabular}' . "\n".
\r
130 + '& \dollar ' . $line->{'amount'} . '\\\\\\hline' . "\n";
\r