company email
[freeside.git] / conf / invoice_latex.diff
1 --- invoice_latex.old   2005-04-14 01:52:02.000000000 -0700
2 +++ invoice_latex       2005-04-14 02:33:26.000000000 -0700
3 @@ -5,7 +5,7 @@
4  %% Asplen Management Ltd\r
5  %% www.asplen.co.uk\r
6  %%\r
7 -%% Modified for Freeside by Ivan Kohler\r
8 +%% Modified for Freeside by Ivan Kohler and Kristian Hoffman\r
9  %%\r
10  %% Changes\r
11  %%     0.1     4/12/00 Created\r
12 @@ -61,7 +61,7 @@
13  %%     Headers and footers defined for the first page\r
14  \fancyfoot[CO,CE]{\small{\r
15  \begin{tabular}{c}\r
16 -$footer\r
17 +[@-- $footer --@]\r
18  \end{tabular}}}\r
19  %\r
20  %%     The LH Heading comprising logo\r
21 @@ -76,7 +76,7 @@
22  \begin{tabular}{rcl}\r
23  Invoice date & & Invoice number \\\r
24  \vspace{0.2cm}\r
25 -\textbf{$date} & & \textbf{$invnum} \\\hline\r
26 +\textbf{[@-- $date --@]} & & \textbf{[@-- $invnum --@]} \\\hline\r
27  \rule{0pt}{5ex} &~~ \huge{\textsc{Invoice}}& \\\r
28  \vspace{-0.2cm}\r
29   & & \\\hline\r
30 @@ -85,71 +85,76 @@
31  %%     Header & footer changes for subsequent pages\r
32  %\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
38  \begin{tabular}{ll}\r
39  Invoice date & Invoice number\\\r
40 -\textbf{$date} & \textbf{$invnum}\\\r
41 +\textbf{[@-- $date --@]} & \textbf{[@-- $invnum --@]}\\\r
42  \end{tabular}}} }\r
43  %\r
44  %\r
45  \makebox{\r
46  \begin{minipage}[t]{2.9in}\r
47  \vspace{0.20in}\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
60  \end{minipage}}\r
61  \hfill\r
62  \makebox{\r
63  \begin{minipage}[t]{2.5in}\r
64  \begin{flushright}\r
65 -Terms: $terms\\\r
66 -$po_line\\\r
67 +Terms: [@-- $terms --@]\\\r
68 +[@-- $po_line --@]\\\r
69  \end{flushright}\r
70  \end{minipage}}\r
71  \vspace{0.5cm}\r
72  %\r
73  \section*{\textsc{Charges}}\r
74 -\begin{longtable}{|c|l|c|r|r|}\r
75 +\begin{longtable}{|c|l|r|}\r
76  \hline\r
77  \rule{0pt}{2.5ex}\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
85  \hline\r
86  \endfirsthead\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
89  \hline\r
90  \rule{0pt}{2.5ex}\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
98  \hline\r
99  \endhead\r
100 -\multicolumn{5}{r}{\rule{0pt}{2.5ex}/cont...}\\\r
101 +\multicolumn{3}{r}{\rule{0pt}{2.5ex}/cont...}\\\r
102  \endfoot\r
103 -%%TotalDetails\r
104 - & \multicolumn{3}{l}{$total_item}    & $total_amount\\\r
105 -%%EndTotalDetails\r
106 +[@--\r
107 +\r
108 +  foreach my $line (@total_items) {\r
109 +    $OUT .= ' & \multicolumn{1}{l}{' . $line->{'total_item'} . '} & ' .\r
110 +            $line->{'total_amount'} . '\\\\' . "\n";\r
111 +  }\r
112 +\r
113 +--@]\r
114  \hline\r
115  \endlastfoot\r
116 -%%Detail\r
117 -\rule{0pt}{2.5ex}$ref & \r
118 -\begin{tabular}{l}\r
119 -$description\tabularnewline\r
120 -\end{tabular}\r
121 -& $quantity & \dollar $amount & \dollar $amount\\\hline\r
122 -%%EndDetail\r
123 +[@--\r
124 +\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
131 +  }\r
132 +\r
133 +--@]\r
134  \end{longtable}\r
135  \vfill\r
136 -$notes\r
137 +[@-- $notes --@]\r
138  \end{document}\r