[freeside-commits] freeside/httemplate/misc cancel_cust.html, 1.1.2.5, 1.1.2.6
Ivan,,,
ivan at wavetail.420.am
Wed May 7 14:36:38 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv11867/misc
Modified Files:
Tag: FREESIDE_1_7_BRANCH
cancel_cust.html
Log Message:
fix customer cancellation, sort of a side effect of #2872, fixes #3480, #3481
Index: cancel_cust.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/cancel_cust.html,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -d -r1.1.2.5 -r1.1.2.6
--- cancel_cust.html 1 Apr 2008 06:34:31 -0000 1.1.2.5
+++ cancel_cust.html 7 May 2008 21:36:36 -0000 1.1.2.6
@@ -14,7 +14,7 @@
<% ntable("#cccccc", 2) %>
-<% include('/elements/tr-select-reason.html', 'reasonnum', 'C', '', '', '', "document.getElementById('confirm_cancel_cust_button')",
+<% include('/elements/tr-select-reason.html', 'reasonnum', 'C', $reasonnum, '', '', "document.getElementById('confirm_cancel_cust_button')",
)
%>
@@ -30,24 +30,19 @@
<%init>
-my($custnum, $reasonnum, $submit, $cust_main, $curuser, $class);
+$cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum';
+my $custnum = $1;
+
+my $reasonnum = '';
if ( $cgi->param('error') ) {
- $custnum = $cgi->param('custnum');
- $reasonnum = $cgi->param('reasonnum');
-} else {
- my( $query ) = $cgi->keywords;
- if ( $query =~ /^(\d+)$/ ) {
- $custnum = $1;
- } else {
- die "illegal query ". $cgi->keywords;
- }
+ $reasonnum = $cgi->param('reasonnum');
}
-$curuser = $FS::CurrentUser::CurrentUser;
+my $curuser = $FS::CurrentUser::CurrentUser;
die "access denied" unless $curuser->access_right('Cancel customer');
-$cust_main = qsearchs( {
+my $cust_main = qsearchs( {
'table' => 'cust_main',
'hashref' => { 'custnum' => $custnum },
'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
More information about the freeside-commits
mailing list