% # Customer comments % if ( $cust_main->comments =~ /[^\s\n\r]/ ) {
<% mt('Comments') |h %> <% ntable("#cccccc") %><% ntable("#cccccc",2) %>
<% encode_entities($cust_main->comments) %>


% } % # Notes, if any % my $notecount = scalar($cust_main->notes(0)); % if ( ! $conf->exists('cust_main-disable_notes') || $notecount) { % unless ( $view eq 'notes' && $cust_main->comments !~ /[^\s\n\r]/ ) {

<% mt('Notes') |h %>

% } % if ( $curuser->access_right('Add customer note') && % ! $conf->exists('cust_main-disable_notes') % ) {

<& /elements/popup_link-cust_main.html, 'label' => emt('Add customer note'), 'action' => $p. 'edit/cust_main_note.cgi', 'actionlabel' => emt('Enter customer note'), 'cust_main' => $cust_main, 'width' => 616, 'height' => 538, #575 &>

% } % # actually display notes <& notes/notes.html, 'cust_main' => $cust_main &>
% } # end of notes % # Attachments % # XXX at some point move all of this into notes/attachments.html % if( $curuser->access_right('View attachments') ) { % # List attachments <& notes/attachments.html, 'cust_main' => $cust_main &> % # "Attach file" link % if(! $conf->config('disable_cust_attachment') % and $curuser->access_right('Add attachment')) { <& /elements/popup_link-cust_main.html, 'label' => emt('Attach file'), 'action' => $p.'edit/cust_main_attach.cgi', 'actionlabel' => emt('Upload file'), 'cust_main' => $cust_main, 'width' => 480, 'height' => 296, &> % } % if ($cgi->param('show_deleted')) { ">(<% mt('Show active attachments') |h %>) % } elsif($curuser->access_right('View deleted attachments')) { ">(<% mt('Show deleted attachments') |h %>) % } % }
% if ( $curuser->access_right('View email logs') % and FS::cust_msg->count("custnum = $custnum")) {
<& notes/email.html, 'cust_main' => $cust_main &>
% } <%init> use HTML::Defang; my $conf = new FS::Conf; my $curuser = $FS::CurrentUser::CurrentUser; my(%opt) = @_; my $cust_main = $opt{'cust_main'}; my $custnum = $cust_main->custnum; my $view = $cgi->param('show') || $curuser->default_customer_view;