add svc_elec_features merged from reference code RT#7643
[freeside.git] / conf / rec_latex
1 %% LyX 1.4.3-5 created this file.  For more info, see http://www.lyx.org/.
2 %% Do not edit unless you really know what you are doing.
3 \documentclass[english]{article}
4 \usepackage{times}
5 \usepackage[T1]{fontenc}
6 \usepackage[latin1]{inputenc}
7 \usepackage[bottom=1cm] {geometry}
8 \usepackage{graphicx}
9 \usepackage{multirow,colortbl}
10 \geometry{verbose,letterpaper}
11 \usepackage{array}
12 \usepackage{calc}
13 \usepackage{color}
14 \thispagestyle{empty}
15 \makeatletter
16
17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
18 %% Because html converters don't know tabularnewline
19 \providecommand{\tabularnewline}{\\}
20 \newcommand{\addspacefive}{&&&&\tabularnewline[-0.1in]}
21 \newcommand{\addspaceseven}[1]{&&&&&&\tabularnewline[#1]}
22 \newcommand{\addspacetwo}{&\tabularnewline[0.01in]}
23 \usepackage{babel}
24 \makeatother
25 \addtolength{\hoffset}{-3.1cm}  
26 %\addtolength{\voffset}{-2.75cm}                % top margin to top of header
27 \setlength{\textheight}{10.9in}
28 \begin{document}
29
30
31 \begin{minipage}[t][0.25\totalheight]{0.30\columnwidth}%
32 \vspace{0pt}
33 \centering
34 %\includegraphics[width=1\textwidth]{logo.eps} 
35 %\includegraphics{logo.eps} 
36 {{\includegraphics{[@-- $conf_dir --@]/logo}}}
37 \end{minipage}
38 \hspace{1.2in}
39 \begin{minipage}[t][0.20\totalheight]{0.4\columnwidth}
40 \vspace{0pt}
41 \centering
42
43 \large [@-- 
44          @array=split(/\n/, $returnaddress);
45          $help=1;
46          foreach $line(@array){
47            if($line eq ""){
48              $line ="~"
49            }
50            if($help == 1){
51              $OUT= "\\textbf{".$line."}";
52              $help=0;
53            }
54            else{
55              $OUT = $OUT."\\\\ ".$line;
56            }
57          }
58       --@]
59 %\large \textbf{Addresse}\\ von ONPAC\\ Strasse 34der\\keine\\~\\ahnung
60 \end{minipage}
61
62 %\vspace{-0.1in}
63 \vspace{-0.3in}
64 \hspace{5.9in}
65 \begin{minipage}[t][0.25\totalheight]{0.3\columnwidth}
66 \vspace{0pt}
67 \centering
68 \normalsize
69 Office Hours:\\
70 Monday To Friday\\
71 9:00 a.m - 5:00 p.m\\
72 Customer Billing Support\\
73 1-866-696-6722
74 \end{minipage}
75 \vspace{.8 in}
76
77 \begin{minipage}[t][0.8\totalheight]{1\columnwidth}%
78 \setlength{\arrayrulewidth}{0.8pt}
79 %2.5 inch = 0.4203\textwidth
80
81 \begin{tabular}{|>{\centering}p{0.1345\textwidth}|>{\centering}p{0.41\textwidth}|>{\centering}p{0.0606\textwidth}|>{\centering}p{0.2185\textwidth}|>{\centering}p{0.36\textwidth}|}
82 \hline
83
84 \rowcolor{black}
85 \rule{0mm}{4mm}
86 {\normalsize \textbf{\color{white}{ACCOUNT\#}}}&
87 {\normalsize \textbf{\color{white}{CUSTOMER NAME}}}&
88 {\normalsize \textbf{\color{white}{RATE}}}&
89 {\normalsize \textbf{\color{white}{PHONE NUMBER}}}&
90 {\normalsize \textbf{\color{white}{SERVICE ADDRESS}}}\tabularnewline[.2ex]
91 \hline
92 \addspacefive
93 \normalsize [@-- $custnum --@] &
94 \normalsize [@-- if($company){$company}
95                   else{$payname} --@]&
96 \normalsize [@-- sprintf('%.3f',$rate) --@]&
97 \normalsize [@-- $phone --@]&
98 \normalsize [@-- $srvc_addr --@]\tabularnewline
99 \hline
100 \end{tabular}%
101 \vspace{5mm}
102 %~\newline
103 %\Large{\textbf{STATEMENT SUMMARY}} \newline
104 \Large{\textbf{ACCOUNT SUMMARY}} \newline
105 \normalsize
106 \vspace{3mm}
107 \begin{tabular}{l l l}
108 {{ESSID: [@--$esiid--@] }} &
109 {{METER \#: [@--$meter_number--@] }} &
110 {{SERVICE CODE: [@--$pkg_info--@]}}
111 \end{tabular}
112 %\vspace{3mm}
113 %\normalsize {\textbf{ESSID: [@--$esiid--@] }} \newline
114 %\normalsize {\textbf{METER \#: [@--$meter_number--@] }} \newline
115 %\normalsize {\textbf{SERVICE CODE: [@--$pkg_info--@]}} \newline
116 \large
117 ~\newline
118 \vspace{3mm}
119 %\begin{tabular}{|>{\centering}p{0.75in}>{\centering}p{0.75in}>{\centering}p{0.75in}>
120 %{\centering}m{0.75in}|>{\centering}p{0.75in}>{\centering}p{0.75in}||>{\centering}p{0.75in}>{\centering}p{0.75in}|}
121 \begin{tabular}{|>{\centering}p{0.75in}{r}>{\centering}p{0.50in}>
122 {\centering}m{1.75in}|>{\centering}p{0.75in}{r}||>{\centering}p{0.75in}{r}|}
123
124 \hline
125 %Read Date&Usage&\# Days&Rate&Bill Date&Amount&PayDate&Amount \tabularnewline[0.2ex]
126 \multicolumn{6}{|c||}{\textbf {STATEMENT}}&\multicolumn{2}{c|}{\textbf {PAYMENT}}\tabularnewline[0.2ex]
127 %\hline
128 \multicolumn{1}{|c}{Read Date}&\multicolumn{1}{c}{Usage}&\multicolumn{1}{c}{\# Days}
129 &\multicolumn{1}{c}{Note}&\multicolumn{1}{c}{Bill Date}
130 &\multicolumn{1}{c||}{Amount}&\multicolumn{1}{c}{PayDate}
131 &\multicolumn{1}{c|}{Amount}\tabularnewline[0.2ex]
132 \hline
133 \normalsize
134 [@-- 
135   use Date::Format;
136   $OUT='';
137   my $billlength=@total_bills;
138   my $paylength=@total_payments;
139   my $detaillength=@total_details;
140         
141   my $max =$billlength;
142   $max=$paylength if($paylength>$max);
143
144   for($i=0;$i<$max;$i=$i+1){
145     if($i <$detaillength){
146
147       if(@total_details[$i]->energy_usage>0){
148         $OUT.= '{\small '.time2str('%D',@total_details[$i]->curr_date)."}&";
149       }
150       else{
151         $OUT.="&";
152       }
153
154       $OUT.= '{\small '.sprintf('%.0f',@total_details[$i]->energy_usage)."}&";
155       $OUT.= '{\small '.@total_details[$i]->number_of_days."}&";
156       if (@total_details[$i]->curr_date) {
157         $OUT.= '&';
158       }
159       else {
160         $OUT.= '&';
161         #if (@total_details[$i]->one_time_description) {
162         #  $OUT.= '{\small '.lc (sprintf('%20s',@total_details[$i]->one_time_description))."}&";
163         #}
164         #else {
165         #  $OUT.= '&';
166         #}
167       }
168     }
169     else{
170       $OUT.="&&&";
171     }
172
173     if($i <$billlength){
174       $OUT.= '{\small '.time2str('%D',@total_bills[$i]->_date)."}&";
175       $OUT.= '{\small '.@total_bills[$i]->charged."}&";
176     }
177     else{
178       $OUT.="&&&";
179     }
180
181     if($i <$paylength){
182       $OUT.= '{\small '.time2str('%D',@total_payments[$i]->_date)."}&";
183       $OUT.= '{\small '.@total_payments[$i]->paid .'}';
184     }
185     else{
186       $OUT.="&";
187     }
188
189     $OUT.="\\small \\tabularnewline\n";
190   }
191
192   for(my $i=$max;$i<20;$i=$i+1){
193     $OUT.="&&&&&&&\\tabularnewline\n";
194   }
195         
196 --@]
197         \hline
198         \end{tabular}
199 \vspace{3mm}
200 \large{\textbf{CURRENT BALANCE: [@-- $actual_balance --@]}}
201 ~\newline
202 \normalsize
203 \begin{tabular}{>{\centering}p{8in}}
204 \hspace{3in}{\small{Please detach and return your payment payable to ONPAC Energy}}\tabularnewline[0.2ex]
205 \end{tabular}
206 %\begin{tabular}{|>{\raggedright}p{6.315in}|>{\centering}p{1.08in}|}
207 %\vspace{-0.5cm}
208 %\vspace{-0.5cm}
209 %%\addspacetw
210 %\textbf{ENERGY BASE}&
211 %\textbf{4.95}\tabularnewline
212 %\end{tabular}
213 %\vspace{0.2in} #the delivery address
214 \vspace{.4in}
215 %\begin{tabular}{>{\centering}p{3.955in}c}
216 \begin{tabular}{>{\centering}p{3.455in}c}
217
218
219 \begin{tabular}{c}
220
221 %\tabularnewline #move everything down
222 \tabularnewline[8ex]
223 \large \textbf{OnPAC Energy}\\
224 \tabularnewline[-2ex]
225 \textbf{ P.O. Box 831787, Richardson TX 75083-1787}\\
226 \textbf{REP PUCT Number 10077}
227 \tabularnewline[4ex]
228
229 \setlength{\fboxrule}{1pt}
230 \fbox{\fcolorbox{black}{black}{\parbox[c][1\totalheight]{0.4\columnwidth}{
231 [@-- 
232     # print PAST DUE if ballance is greater than zero
233     $OUT = '';
234     if ($actual_balance > 0 && !ignore_due_date) {
235       $OUT = '\LARGE \centering {\textbf{\textcolor{white}{ACCOUNT \linebreak PAST DUE}}}';
236     }
237     else {
238       $OUT = '\LARGE \centering {\textbf{\textcolor{white}{ACCOUNT \linebreak SUMMARY}}}';
239     }
240  --@]
241 }}}%
242 \tabularnewline
243
244 \end{tabular}&
245 %\begin{tabular}{|>{\centering}p{1.3in}|>{\centering}p{0.78in}|>{\centering}p{1.05in}|}
246 \begin{tabular}{|>{\centering}p{1.3in}|>{\centering}p{0.78in}|>{\centering}p{1.05in}|}
247 \hline 
248 &&\tabularnewline[-2ex]
249 %\rowcolor{black}
250 ACCOUNT NUMBER&
251 DUE DATE&
252 BALANCE \tabularnewline
253 \hline
254 \hline 
255 &&\tabularnewline[-2ex]
256 \normalsize \textbf{[@--$custnum--@]}&
257 %\normalsize \textbf{[@--$due_date--@]}&
258 [@--
259     # don't print the due date if balance is zero
260     $OUT = '';
261     if ($actual_balance > 0) {
262       $OUT = '\normalsize \textbf{' . $due_date . '}&';
263     }
264     else {
265       $OUT ='&';
266     }
267  --@]
268 \normalsize \textbf{[@--$actual_balance--@]}\tabularnewline[0.3ex]
269 \hline 
270 &&\tabularnewline[-2ex]
271 Billing Date&
272 Rate Code&
273 Meter \#\tabularnewline
274 \hline 
275 &&\tabularnewline[-2ex]
276 %\textbf{[@--$date--@]}&
277 [@--
278     # don't print the billing date if balance is zero
279     $OUT = '';
280     if ($actual_balance > 0) {
281       $OUT = '\textbf{'.$date.'}&';
282     }
283     else {
284       $OUT ='&';
285     }
286  --@]
287 \textbf{[@--sprintf('%.3f',$rate)--@]}&
288 \textbf{[@--$meter_number--@]}\tabularnewline
289 \hline
290
291 \end{tabular}\tabularnewline
292 \end{tabular}
293
294 \begin{tabular}{>{\raggedright}p{4.17in}l}
295 %\tabularnewline[-0.08in]
296 \tabularnewline[-.10in]
297 \hspace{0.4in}\large{\textbf{[@-- $company --@]}}&
298 \tabularnewline
299 \hspace{0.4in}\large{\textbf{[@-- $payname --@]}}&
300 \tabularnewline
301 \hspace{0.4in}\large{\textbf{[@-- $address1 --@]}}&
302 \hspace{0.4in} \sffamily{\large{*[@--$custnum--@]*}}\tabularnewline%[0.4ex]
303 \hspace{0.4in}\large{\textbf{[@-- $city --@], [@-- $state --@]~~[@-- $zip --@]}}&
304 %\hspace{0.6in}\large{\textbf{[@-- $address1 --@]}}&
305 %\hspace{0.6in} \sffamily{\large{*[@--$custnum--@]*}}\tabularnewline%[0.4ex]
306 %\hspace{0.6in}\large{\textbf{[@-- $city --@], [@-- $state --@]~~[@-- $zip --@]}}&
307 \tabularnewline
308
309
310 \end{tabular}
311
312 \end{minipage}%
313
314
315 \end{document}