1 <% include('/elements/header-popup.html', "$action Customer Note") %>
3 <% include('/elements/error.html') %>
5 <FORM ACTION="<% popurl(1) %>process/cust_main_note.cgi" METHOD=POST>
6 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
7 <INPUT TYPE="hidden" NAME="notenum" VALUE="<% $notenum %>">
11 <TEXTAREA NAME="comment" ROWS="12" COLS="60">
16 <INPUT TYPE="submit" VALUE="<% $notenum ? "Apply Changes" : "Add Note" %>">
26 if ( $cgi->param('error') ) {
27 $comment = $cgi->param('comment');
28 } elsif ( $cgi->param('notenum') =~ /^(\d+)$/ ) {
30 die "illegal query ". $cgi->keywords unless $notenum;
31 my $note = qsearchs('cust_main_note', { 'notenum' => $notenum });
32 die "no such note: ". $notenum unless $note;
33 $comment = $note->comments;
36 $cgi->param('custnum') =~ /^(\d+)$/ or die "illeagl custnum";
39 my $action = $notenum ? 'Edit' : 'Add';
42 unless $FS::CurrentUser::CurrentUser->access_right("$action customer note");