[freeside-commits] freeside/httemplate/misc/process cancel_pkg.html, 1.4, 1.5
Jeff Finucane,420,,
jeff at wavetail.420.am
Tue Jun 26 08:37:21 PDT 2007
Update of /home/cvs/cvsroot/freeside/httemplate/misc/process
In directory wavetail:/tmp/cvs-serv2558/httemplate/misc/process
Modified Files:
cancel_pkg.html
Log Message:
suspend later just like expire (#1487)
Index: cancel_pkg.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/cancel_pkg.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cancel_pkg.html 29 Jan 2007 21:11:49 -0000 1.4
+++ cancel_pkg.html 26 Jun 2007 15:37:19 -0000 1.5
@@ -1,7 +1,7 @@
<%init>
#untaint method
my $method = $cgi->param('method');
-$method =~ /^(cancel|expire|suspend)$/ || die "Illegal method";
+$method =~ /^(cancel|expire|suspend|adjourn)$/ || die "Illegal method";
$method = $1;
#untaint pkgnum
@@ -15,7 +15,7 @@
$reasonnum = $1;
my $date = time;
-if ($method eq 'expire'){
+if ($method eq 'expire' || $method eq 'adjourn'){
#untaint date
$date = $cgi->param('date');
str2time($cgi->param('date')) =~ /^(\d+)$/ || die "Illegal date";
@@ -47,9 +47,9 @@
}
unless ($error) {
- if ($method eq 'expire'){
+ if ($method eq 'expire' || $method eq 'adjourn'){
my %hash = $cust_pkg->hash;
- $hash{'expire'}=$date;
+ $hash{$method}=$date;
my $new = new FS::cust_pkg (\%hash);
$error = $new->replace($cust_pkg, 'reason' => $reasonnum);
}else{
@@ -68,6 +68,7 @@
my %past = ( 'cancel' => 'cancelled',
'expire' => 'expired',
'suspend' => 'suspended',
+ 'adjourn' => 'adjourned',
);
</%init>
<% header("Package $past{$method}") %>
More information about the freeside-commits
mailing list