From 30c3ff2acf90e1386fae00759078899c859faf36 Mon Sep 17 00:00:00 2001 From: jeff Date: Tue, 3 Oct 2006 22:44:28 +0000 Subject: Enhanced customer notes --- httemplate/edit/cust_main_note.cgi | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 httemplate/edit/cust_main_note.cgi (limited to 'httemplate/edit/cust_main_note.cgi') diff --git a/httemplate/edit/cust_main_note.cgi b/httemplate/edit/cust_main_note.cgi new file mode 100755 index 000000000..468ef0051 --- /dev/null +++ b/httemplate/edit/cust_main_note.cgi @@ -0,0 +1,37 @@ +<% include('/elements/header-popup.html', 'Add Customer Note') %> + +% if ( $cgi->param('error') ) { + Error: <% $cgi->param('error') %> +

+% } + +
+ + + +

+ + +

+ + +
+ + + +<%init> +my($custnum, $comment); +$comment = ''; + +if ( $cgi->param('error') ) { + $comment = $cgi->param('comment'); +} +$cgi->param('custnum') =~ /^(\d+)$/; +$custnum = $1; + +die "illegal query ". $cgi->keywords unless $custnum; + + + -- cgit v1.2.1 From 576c6b48428aa95e0fd80db011fe73c0b728c88b Mon Sep 17 00:00:00 2001 From: jeff Date: Fri, 27 Oct 2006 17:01:31 +0000 Subject: editable notes --- httemplate/edit/cust_main_note.cgi | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'httemplate/edit/cust_main_note.cgi') 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'; + -- cgit v1.2.1