2 % my $conf = new FS::Conf;
3 % my $curuser = $FS::CurrentUser::CurrentUser;
5 % $cgi->param('custnum') =~ /^(\d+)$/
6 % or die "No customer specified (bad URL)!";
9 % my $cust_main = qsearchs('cust_main', {'custnum' => $custnum} );
10 % die "Custimer not found!" unless $cust_main;
13 <STYLE TYPE="text/css">
15 body { background: #e8e8e8 }
16 .inv table { border: none }
17 .inv TH { border: none }
18 .inv TD { border: none }
22 % my (@notes) = $cust_main->notes();
23 % if ( scalar(@notes) ) {
25 <SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws.js"></SCRIPT>
26 <SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws_iframe.js"></SCRIPT>
27 <SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws_crossframe.js"></SCRIPT>
28 <SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/iframecontentmws.js"></SCRIPT>
30 <TABLE CLASS="inv" CELLSPACING=0 CELLPADDING=0 BORDER=0 >
32 % my $bgcolor1 = '#eeeeee';
33 % my $bgcolor2 = '#ffffff';
36 % foreach my $note (@notes) {
38 % if ( $bgcolor eq $bgcolor1 ) {
39 % $bgcolor = $bgcolor2;
41 % $bgcolor = $bgcolor1;
44 % my $pop = popurl(3);
45 % my $notenum = $note->notenum;
46 % my $clickjs = qq!onclick="overlib( OLiframeContent('${pop}edit/! .
47 % qq!cust_main_note.cgi?custnum=$custnum&! .
48 % qq!notenum=$notenum', 616, ! .
49 % qq!386, 'cust_main_note_popup' ), CAPTION, 'Edit customer ! .
50 % qq!note', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, ! .
51 % qq!CLOSECLICK, FRAME, top); return false;"!;
54 % if ($curuser->access_right('Edit customer note') ) {
55 % $el = qq!<A HREF="javascript:void(0);" $clickjs>!;
62 <% note_datestr($note,$conf,$bgcolor, $el, $eel) %>
63 <TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
64 <% $el %> <%$note->otaker%> <% $eel %>
66 <TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
67 <%$note->comments%>
71 % } #end display notes
80 % my($note, $conf, $bgcolor, $el, $eel) = @_ or return '';
81 % my $format=qq{<TD class="inv" bgcolor="$bgcolor" align="left">$el<B>%b</B>$eel</TD>}.
82 % qq{<TD class="inv" bgcolor="$bgcolor" align="right">$el<B> %o,</B>$eel</TD>}.
83 % qq{<TD class="inv" bgcolor="$bgcolor" align="right">$el<B> %Y </B>$eel</TD>};
84 % $format .= qq{<TD class="inv" bgcolor="$bgcolor" ALIGN="right">$el<B> %l$eel</TD>}.
85 % qq{<TD class="inv" bgcolor="$bgcolor" ALIGN="center">$el<B>:</B>$eel</TD>}.
86 % qq{<TD class="inv" bgcolor="$bgcolor" ALIGN="left">$el<B>%M</B>$eel</TD>}.
87 % qq{<TD class="inv" bgcolor="$bgcolor" ALIGN="left">$el<B> %P </B>$eel</TD>}
88 % if $conf->exists('cust_main_note-display_times');
89 % ( my $strip = time2str($format, $note->_date) ) =~ s/ (\d)/$1/g;