X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main_note.cgi;h=303895bd8366a2f72a9bfdb7bcacfa671f15cc38;hb=576c6b48428aa95e0fd80db011fe73c0b728c88b;hp=468ef00517bdaf4327305828edcaeb88bd5b5676;hpb=fc3483c8679daf2e00467db05342e9fcd314d541;p=freeside.git diff --git a/httemplate/edit/cust_main_note.cgi b/httemplate/edit/cust_main_note.cgi index 468ef0051..303895bd8 100755 --- a/httemplate/edit/cust_main_note.cgi +++ b/httemplate/edit/cust_main_note.cgi @@ -1,4 +1,4 @@ -<% include('/elements/header-popup.html', 'Add Customer Note') %> +<% include('/elements/header-popup.html', "$action Customer Note") %> % if ( $cgi->param('error') ) { Error: <% $cgi->param('error') %> @@ -7,6 +7,7 @@
+

@@ -15,23 +16,36 @@

- +">
<%init> -my($custnum, $comment); +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'; +