1 % if ( scalar(@notes) ) {
3 <% include('/elements/init_overlib.html') %>
5 <% include("/elements/table-grid.html") %>
8 <TH CLASS="grid" BGCOLOR="#cccccc">Date</TH>
9 % if ( $conf->exists('cust_main_note-display_times') ) {
10 <TH CLASS="grid" BGCOLOR="#cccccc">Time</TH>
12 <TH CLASS="grid" BGCOLOR="#cccccc">Person</TH>
13 <TH CLASS="grid" BGCOLOR="#cccccc">Note</TH>
16 % my $bgcolor1 = '#eeeeee';
17 % my $bgcolor2 = '#ffffff';
20 % foreach my $note (@notes) {
22 % if ( $bgcolor eq $bgcolor1 ) {
23 % $bgcolor = $bgcolor2;
25 % $bgcolor = $bgcolor1;
28 % my $pop = popurl(3);
29 % my $notenum = $note->notenum;
30 % my $onclick = include( '/elements/popup_link_onclick.html',
31 % 'action' => popurl(2).
32 % 'edit/cust_main_note.cgi'.
33 % "?custnum=$custnum".
34 % ";notenum=$notenum",
35 % 'actionlabel' => 'Edit customer note',
40 % my $clickjs = qq!onclick="$onclick"!;
43 % if ($curuser->access_right('Edit customer note') ) {
44 % $edit = qq! <A HREF="javascript:void(0);" $clickjs>(edit)</A>!;
48 <% note_datestr($note,$conf,$bgcolor) %>
49 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
50 <% $note->otaker%>
52 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
53 <%$note->comments%><% $edit %>
57 % } #end display notes
64 my $conf = new FS::Conf;
65 my $curuser = $FS::CurrentUser::CurrentUser;
69 my $custnum = $opt{'custnum'};
71 my $cust_main = qsearchs('cust_main', {'custnum' => $custnum} );
72 die "Custimer not found!" unless $cust_main;
74 my (@notes) = $cust_main->notes();
79 my($note, $conf, $bgcolor) = @_ or return '';
80 my $td = qq{<TD CLASS="grid" BGCOLOR="$bgcolor" ALIGN="right">};
81 my $format = "$td%b %o, %Y</TD>";
82 $format .= "$td%l:%M%P</TD>"
83 if $conf->exists('cust_main_note-display_times');
84 ( my $strip = time2str($format, $note->_date) ) =~ s/ (\d)/$1/g;