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 % # actually display notes
20 <& notes/notes.html, 'cust_main' => $cust_main &>
25 % # XXX at some point move all of this into notes/attachments.html
26 % if( $curuser->access_right('View attachments') ) {
28 <& notes/attachments.html, 'cust_main' => $cust_main &>
29 % if ($cgi->param('show_deleted')) {
30 <A HREF="<% $p.'view/cust_main.cgi?custnum=' . $cust_main->custnum .
31 ($view ? ";show=$view" : '') . '#notes'
32 %>"><I>(<% mt('Show active attachments') |h %>)</I></A>
33 % } elsif($curuser->access_right('View deleted attachments')) {
34 <A HREF="<% $p.'view/cust_main.cgi?custnum=' . $cust_main->custnum .
35 ($view ? ";show=$view" : '') . ';show_deleted=1#notes'
36 %>"><I>(<% mt('Show deleted attachments') |h %>)</I></A>
41 % if ( $curuser->access_right('View email logs')
42 % and FS::cust_msg->count("custnum = $custnum")) {
44 <& notes/email.html, 'cust_main' => $cust_main &>
51 my $conf = new FS::Conf;
52 my $curuser = $FS::CurrentUser::CurrentUser;
56 my $cust_main = $opt{'cust_main'};
57 my $custnum = $cust_main->custnum;
59 my $view = $cgi->param('show') || $curuser->default_customer_view;