summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2000-01-30 06:54:50 +0000
committerivan <ivan>2000-01-30 06:54:50 +0000
commitb950a203e0cc09ae962baf888df26c775b9f17f1 (patch)
tree3df54f7dcbef23677bb78fca2792d4b2ccb30354
parentfe10321b9a9fa1025af12aeb61e7b08e9ba25cb2 (diff)
credit card expiration dates not sticky bug fixed?
-rwxr-xr-xhtdocs/edit/cust_main.cgi24
1 files changed, 16 insertions, 8 deletions
diff --git a/htdocs/edit/cust_main.cgi b/htdocs/edit/cust_main.cgi
index 10f1dba1f..4eef9c74d 100755
--- a/htdocs/edit/cust_main.cgi
+++ b/htdocs/edit/cust_main.cgi
@@ -1,6 +1,6 @@
#!/usr/bin/perl -Tw
#
-# $Id: cust_main.cgi,v 1.23 2000-01-27 00:53:14 ivan Exp $
+# $Id: cust_main.cgi,v 1.24 2000-01-30 06:54:50 ivan Exp $
#
# Usage: cust_main.cgi custnum
# http://server.name/path/cust_main.cgi?custnum
@@ -38,7 +38,10 @@
# fixed one missed day->daytime ivan@sisd.com 98-jul-13
#
# $Log: cust_main.cgi,v $
-# Revision 1.23 2000-01-27 00:53:14 ivan
+# Revision 1.24 2000-01-30 06:54:50 ivan
+# credit card expiration dates not sticky bug fixed?
+#
+# Revision 1.23 2000/01/27 00:53:14 ivan
# 5.004_04 workaround
#
# Revision 1.22 1999/12/17 02:33:23 ivan
@@ -285,13 +288,18 @@ print "</TABLE>$r required fields<BR>";
sub expselect {
my $prefix = shift;
- my $date = shift || '';
- my( $m, $y ) = ( 0, 0 );
- if ( $date =~ /^(\d{4})-(\d{2})-\d{2}$/ ) { #PostgreSQL date format
- ( $m, $y ) = ( $2, $1 );
- } elsif ( $date =~ /^(\d{1,2})-(\d{1,2}-)?(\d{4}$)/ ) {
- ( $m, $y ) = ( $1, $3 );
+ my( $m, $y ) = (0, 0);
+ if ( scalar(@_) ) {
+ my $date = shift;
+ if ( $date =~ /^(\d{4})-(\d{1,2})-\d{1,2}$/ ) { #PostgreSQL date format
+ ( $m, $y ) = ( $2, $1 );
+ } elsif ( $date =~ /^(\d{1,2})-(\d{1,2}-)?(\d{4}$)/ ) {
+ ( $m, $y ) = ( $1, $3 );
+ } else {
+ die "unrecognized expiration date format: $date";
+ }
}
+
my $return = qq!<SELECT NAME="$prefix!. qq!_month" SIZE="1">!;
for ( 1 .. 12 ) {
$return .= "<OPTION";