2 % my $conf = new FS::Conf;
4 % $cgi->param('custnum') =~ /^(\d+)$/
5 % or die "No customer specified (bad URL)!";
8 % my $cust_main = qsearchs('cust_main', {'custnum' => $custnum} );
9 % die "Custimer not found!" unless $cust_main;
11 % my (@notes) = $cust_main->notes();
12 % if ( scalar(@notes) ) {
14 <STYLE TYPE="text/css">
16 body { background: #e8e8e8 }
17 .inv table { border: none }
18 .inv TH { border: none }
19 .inv TD { border: none }
23 <TABLE CLASS="inv" CELLSPACING=0 CELLPADDING=0 BORDER=0 >
25 %#<% include('/elements/table-grid.html') %>
26 % my $bgcolor1 = '#eeeeee';
27 % my $bgcolor2 = '#ffffff';
30 % foreach my $note (@notes) {
32 % if ( $bgcolor eq $bgcolor1 ) {
33 % $bgcolor = $bgcolor2;
35 % $bgcolor = $bgcolor1;
41 <% note_datestr($note,$conf,$bgcolor) %>
42 <TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
43 <%$note->otaker%>
45 <TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
46 <%$note->comments%>
50 % } #end display notes
61 % my($note, $conf, $bgcolor) = @_ or return '';
62 % my $format=qq{<TD class="inv" bgcolor="$bgcolor" align="left"><B>%b</B></TD>}.
63 % qq{<TD class="inv" bgcolor="$bgcolor" align="right"><B> %o,</B></TD>}.
64 % qq{<TD class="inv" bgcolor="$bgcolor" align="right"><B> %Y </B></TD>};
65 % $format .= qq{<TD class="inv" bgcolor="$bgcolor" ALIGN="right"><B> %l</TD>}.
66 % qq{<TD class="inv" bgcolor="$bgcolor" ALIGN="center"><B>:</B></TD>}.
67 % qq{<TD class="inv" bgcolor="$bgcolor" ALIGN="left"><B>%M</B></TD>}.
68 % qq{<TD class="inv" bgcolor="$bgcolor" ALIGN="left"><B> %P </B></TD>}
69 % if $conf->exists('cust_main_note-display_times');
70 % ( my $strip = time2str($format, $note->_date) ) =~ s/ (\d)/$1/g;