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>
26 % if ( $curuser->access_right('Add customer note') &&
27 % ! $conf->exists('cust_main-disable_notes')
31 <& /elements/popup_link-cust_main.html,
32 'label' => emt('Add customer note'),
33 'action' => $p. 'edit/cust_main_note.cgi',
34 'actionlabel' => emt('Enter customer note'),
35 'cust_main' => $cust_main,
43 % # actually display notes
44 <& notes/notes.html, 'cust_main' => $cust_main &>
49 % # XXX at some point move all of this into notes/attachments.html
50 % if( $curuser->access_right('View attachments') ) {
52 <& notes/attachments.html, 'cust_main' => $cust_main &>
53 % # "Attach file" link
54 % if(! $conf->config('disable_cust_attachment')
55 % and $curuser->access_right('Add attachment')) {
56 <& /elements/popup_link-cust_main.html,
57 'label' => emt('Attach file'),
58 'action' => $p.'edit/cust_main_attach.cgi',
59 'actionlabel' => emt('Upload file'),
60 'cust_main' => $cust_main,
66 % if ($cgi->param('show_deleted')) {
67 <A HREF="<% $p.'view/cust_main.cgi?custnum=' . $cust_main->custnum .
68 ($view ? ";show=$view" : '') . '#notes'
69 %>"><I>(<% mt('Show active attachments') |h %>)</I></A>
70 % } elsif($curuser->access_right('View deleted attachments')) {
71 <A HREF="<% $p.'view/cust_main.cgi?custnum=' . $cust_main->custnum .
72 ($view ? ";show=$view" : '') . ';show_deleted=1#notes'
73 %>"><I>(<% mt('Show deleted attachments') |h %>)</I></A>
78 % if ( $curuser->access_right('View email logs')
79 % and FS::cust_msg->count("custnum = $custnum")) {
81 <& notes/email.html, 'cust_main' => $cust_main &>
88 my $conf = new FS::Conf;
89 my $curuser = $FS::CurrentUser::CurrentUser;
93 my $cust_main = $opt{'cust_main'};
94 my $custnum = $cust_main->custnum;
96 my $view = $cgi->param('show') || $curuser->default_customer_view;