summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2002-07-08 13:07:40 +0000
committerivan <ivan>2002-07-08 13:07:40 +0000
commit1f8d7610c245ecb21667aa656ce083420e5bb797 (patch)
tree5655886b9ab0d6ad1e4d843fd1372f30f60fe986
parente61703420a7eaef1f16ad4251cc7733e7a35604f (diff)
edit expiration dates
-rwxr-xr-xhttemplate/edit/REAL_cust_pkg.cgi19
-rwxr-xr-xhttemplate/edit/process/REAL_cust_pkg.cgi1
2 files changed, 14 insertions, 6 deletions
diff --git a/httemplate/edit/REAL_cust_pkg.cgi b/httemplate/edit/REAL_cust_pkg.cgi
index 580313e88..0d2f1c238 100755
--- a/httemplate/edit/REAL_cust_pkg.cgi
+++ b/httemplate/edit/REAL_cust_pkg.cgi
@@ -1,6 +1,6 @@
<!-- mason kludge -->
<%
-# <!-- $Id: REAL_cust_pkg.cgi,v 1.3 2002-04-23 07:32:49 ivan Exp $ -->
+# <!-- $Id: REAL_cust_pkg.cgi,v 1.4 2002-07-08 13:07:40 ivan Exp $ -->
my $error ='';
my $pkgnum = '';
@@ -45,7 +45,7 @@ print '<FORM NAME="formname" ACTION="process/REAL_cust_pkg.cgi" METHOD="POST">',
print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: $error</FONT>!
if $error;
-print &ntable("#cccccc"), '<TR><TD>', &ntable("#cccccc",2),
+print ntable("#cccccc",2),
'<TR><TD ALIGN="right">Package number</TD><TD BGCOLOR="#ffffff">',
$pkgnum, '</TD></TR>',
'<TR><TD ALIGN="right">Package</TD><TD BGCOLOR="#ffffff">',
@@ -66,16 +66,23 @@ print '<TR><TD ALIGN="right">Suspension date</TD><TD BGCOLOR="#ffffff">',
time2str("%D",$susp), '</TD></TR>'
if $susp;
-print '<TR><TD ALIGN="right">Expiration date</TD><TD BGCOLOR="#ffffff">',
- time2str("%D",$expire), '</TD></TR>'
- if $expire;
+#print '<TR><TD ALIGN="right">Expiration date</TD><TD BGCOLOR="#ffffff">',
+# time2str("%D",$expire), '</TD></TR>'
+# if $expire;
+print '<TR><TD ALIGN="right">Expiration date'.
+ '</TD><TD>',
+ '<INPUT TYPE="text" NAME="expire" SIZE=32 VALUE="',
+ ( $expire ? time2str("%c %z (%Z)",$expire) : "" ), '">'.
+ '<BR><FONT SIZE=-1>(will <b>cancel</b> this package'.
+ ' when the date is reached)</FONT>'.
+ '</TD></TR>';
print '<TR><TD ALIGN="right">Cancellation date</TD><TD BGCOLOR="#ffffff">',
time2str("%D",$cancel), '</TD></TR>'
if $cancel;
%>
-</TABLE></TD></TR></TABLE>
+</TABLE>
<BR><INPUT TYPE="submit" VALUE="Apply Changes">
</FORM>
</BODY>
diff --git a/httemplate/edit/process/REAL_cust_pkg.cgi b/httemplate/edit/process/REAL_cust_pkg.cgi
index 6bed85c19..2e0352c76 100755
--- a/httemplate/edit/process/REAL_cust_pkg.cgi
+++ b/httemplate/edit/process/REAL_cust_pkg.cgi
@@ -5,6 +5,7 @@ my $old = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
my %hash = $old->hash;
$hash{'setup'} = $cgi->param('setup') ? str2time($cgi->param('setup')) : '';
$hash{'bill'} = $cgi->param('bill') ? str2time($cgi->param('bill')) : '';
+$hash{'expire'} = $cgi->param('expire') ? str2time($cgi->param('expire')) : '';
my $new = new FS::cust_pkg \%hash;
my $error = $new->replace($old);