2 % if ( $cust_main->comments =~ /[^\s\n\r]/ ) {
3 <BR><% mt('Comments') |h %>
4 <% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
7 <PRE><% encode_entities($cust_main->comments) %></PRE>
16 % my $notecount = scalar($cust_main->notes(0));
17 % if ( ! $conf->exists('cust_main-disable_notes') || $notecount) {
19 % unless ( $view eq 'notes' && $cust_main->comments !~ /[^\s\n\r]/ ) {
21 <A NAME="cust_main_note"><FONT SIZE="+2"><% mt('Notes') |h %></FONT></A>
28 % # actually display notes
29 <& notes/notes.html, 'cust_main' => $cust_main &>
34 % # XXX at some point move all of this into notes/attachments.html
35 % if( $curuser->access_right('View attachments') ) {
37 <& notes/attachments.html, 'cust_main' => $cust_main &>
38 % if ($cgi->param('show_deleted')) {
39 <A HREF="<% $p.'view/cust_main.cgi?custnum=' . $cust_main->custnum .
40 ($view ? ";show=$view" : '') . '#notes'
41 %>"><I>(<% mt('Show active attachments') |h %>)</I></A>
42 % } elsif($curuser->access_right('View deleted attachments')) {
43 <A HREF="<% $p.'view/cust_main.cgi?custnum=' . $cust_main->custnum .
44 ($view ? ";show=$view" : '') . ';show_deleted=1#notes'
45 %>"><I>(<% mt('Show deleted attachments') |h %>)</I></A>
50 % if ( $curuser->access_right('View email logs')
51 % and FS::cust_msg->count("custnum = $custnum")) {
53 <& notes/email.html, 'cust_main' => $cust_main &>
60 my $conf = new FS::Conf;
61 my $curuser = $FS::CurrentUser::CurrentUser;
65 my $cust_main = $opt{'cust_main'};
66 my $custnum = $cust_main->custnum;
68 my $view = $cgi->param('show') || $curuser->default_customer_view;