diff options
author | ivan <ivan> | 2002-09-16 09:27:14 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-09-16 09:27:14 +0000 |
commit | 3548c2951a51ece84687e3bfb5e435008191a713 (patch) | |
tree | d6059214d5b38e5796549eaef9da61d8612a79a8 | |
parent | 1a4ba4fc23449a4bb189c8e7a69a10a2a793efc3 (diff) |
skip empty expiration dates
-rwxr-xr-x | FS/bin/freeside-expiration-alerter | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/FS/bin/freeside-expiration-alerter b/FS/bin/freeside-expiration-alerter index ee3c1fb92..5399f6d22 100755 --- a/FS/bin/freeside-expiration-alerter +++ b/FS/bin/freeside-expiration-alerter @@ -80,16 +80,18 @@ $alerter->compile() or die "can't compile template: Text::Template::ERROR"; # Now I can start looping foreach my $customer (@customers) { + my $paydate = $customer->getfield('paydate'); + next if $paydate =~ /^\s*$/; #skip empty expiration dates + my $custnum = $customer->getfield('custnum'); my $first = $customer->getfield('first'); my $last = $customer->getfield('last'); my $company = $customer->getfield('company'); my $payby = $customer->getfield('payby'); my $payinfo = $customer->getfield('payinfo'); - my $paydate = $customer->getfield('paydate'); my $daytime = $customer->getfield('daytime'); my $night = $customer->getfield('night'); - + my ($payyear,$paymonth,$payday) = split (/-/,$paydate); my $expire_time = timelocal(0,0,0,$payday,--$paymonth,$payyear); @@ -200,7 +202,7 @@ user: From the mapsecrets file - see config.html from the base documentation =head1 VERSION -$Id: freeside-expiration-alerter,v 1.3 2002-04-16 09:38:19 ivan Exp $ +$Id: freeside-expiration-alerter,v 1.4 2002-09-16 09:27:14 ivan Exp $ =head1 BUGS |