1 <% include('/elements/header-popup.html', "$action Customer Note") %>
3 % if ( $cgi->param('error') ) {
4 <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
8 <FORM ACTION="<% popurl(1) %>process/cust_main_note.cgi" METHOD=POST>
9 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
10 <INPUT TYPE="hidden" NAME="notenum" VALUE="<% $notenum %>">
14 <TEXTAREA NAME="comment" ROWS="12" COLS="60">
19 <INPUT TYPE="submit" VALUE="<% $notenum ? "Apply Changes" : "Add Note" %>">
26 my($custnum, $comment, $notenum, $action);
29 if ( $cgi->param('error') ) {
30 $comment = $cgi->param('comment');
31 }elsif ($cgi->param('notenum')) {
32 $cgi->param('notenum') =~ /^(\d+)$/;
34 die "illegal query ". $cgi->keywords unless $notenum;
35 my $note = qsearchs('cust_main_note', { 'notenum' => $notenum });
36 die "no such note: ". $notenum unless $note;
37 $comment = $note->comments;
40 $cgi->param('notenum') =~ /^(\d+)$/;
43 $cgi->param('custnum') =~ /^(\d+)$/;
46 die "illegal query ". $cgi->keywords unless $custnum;
48 $action = $notenum ? 'Edit' : 'Add';