summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/cust_main_note.cgi
diff options
context:
space:
mode:
authorjeff <jeff>2006-10-03 22:44:28 +0000
committerjeff <jeff>2006-10-03 22:44:28 +0000
commit30c3ff2acf90e1386fae00759078899c859faf36 (patch)
tree75fd2a828c64a2b7bd2d2f4c650d058af726e241 /httemplate/edit/process/cust_main_note.cgi
parent40f370f0fbc6dedee27b8666f7d00e3888a1533b (diff)
Enhanced customer notes
Diffstat (limited to 'httemplate/edit/process/cust_main_note.cgi')
-rwxr-xr-xhttemplate/edit/process/cust_main_note.cgi34
1 files changed, 34 insertions, 0 deletions
diff --git a/httemplate/edit/process/cust_main_note.cgi b/httemplate/edit/process/cust_main_note.cgi
new file mode 100755
index 000000000..d9251f042
--- /dev/null
+++ b/httemplate/edit/process/cust_main_note.cgi
@@ -0,0 +1,34 @@
+%
+%
+%$cgi->param('custnum') =~ /^(\d+)$/
+% or die "Illegal custnum: ". $cgi->param('custnum');
+%my $custnum = $1;
+%
+%my $otaker = $FS::CurrentUser::CurrentUser->name;
+%$otaker = $FS::CurrentUser::CurrentUser->username
+% if ($otaker eq "User, Legacy");
+%
+%my $new = new FS::cust_main_note ( {
+% custnum => $custnum,
+% _date => time,
+% otaker => $otaker,
+% comments => $cgi->param('comment'),
+%} );
+%
+%my $error = $new->insert;
+%
+%if ($error) {
+% $cgi->param('error', $error);
+% print $cgi->redirect(popurl(2). 'cust_main_note.cgi?'. $cgi->query_string );
+%}
+%
+%
+<% header('Note added') %>
+ <SCRIPT TYPE="text/javascript">
+ window.top.location.reload();
+ </SCRIPT>
+
+ </BODY></HTML>
+%
+%
+