<% include('/elements/header-popup.html', "$action Customer Note") %> % if ( $cgi->param('error') ) { Error: <% $cgi->param('error') %>

% }




">
<%init> my($custnum, $comment, $notenum, $action); $comment = ''; if ( $cgi->param('error') ) { $comment = $cgi->param('comment'); }elsif ($cgi->param('notenum')) { $cgi->param('notenum') =~ /^(\d+)$/; $notenum = $1; die "illegal query ". $cgi->keywords unless $notenum; my $note = qsearchs('cust_main_note', { 'notenum' => $notenum }); die "no such note: ". $notenum unless $note; $comment = $note->comments; } $cgi->param('notenum') =~ /^(\d+)$/; $notenum = $1; $cgi->param('custnum') =~ /^(\d+)$/; $custnum = $1; die "illegal query ". $cgi->keywords unless $custnum; $action = $notenum ? 'Edit' : 'Add';