% % my $conf = new FS::Conf; % % $cgi->param('custnum') =~ /^(\d+)$/ % or die "No customer specified (bad URL)!"; % my $custnum = $1; % % my $cust_main = qsearchs('cust_main', {'custnum' => $custnum} ); % die "Custimer not found!" unless $cust_main; % % my (@notes) = $cust_main->notes(); % if ( scalar(@notes) ) { %#<% include('/elements/table-grid.html') %> % my $bgcolor1 = '#eeeeee'; % my $bgcolor2 = '#ffffff'; % my $bgcolor = ''; % % foreach my $note (@notes) { % % if ( $bgcolor eq $bgcolor1 ) { % $bgcolor = $bgcolor2; % } else { % $bgcolor = $bgcolor1; % } % % <% note_datestr($note,$conf,$bgcolor) %> % } #end display notes
 <%$note->otaker%>   <%$note->comments%>
% } else {
% } % %#subroutines % %sub note_datestr { % my($note, $conf, $bgcolor) = @_ or return ''; % my $format=qq{%b}. % qq{ %o,}. % qq{ %Y }; % $format .= qq{ %l}. % qq{:}. % qq{%M}. % qq{ %P } % if $conf->exists('cust_main_note-display_times'); % ( my $strip = time2str($format, $note->_date) ) =~ s/ (\d)/$1/g; % $strip; % } %