diff options
author | ivan <ivan> | 2003-05-10 05:40:53 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-05-10 05:40:53 +0000 |
commit | 59b2ab6633c0fe401cfe3b74f5cd4e8883a6fc22 (patch) | |
tree | ca4e0a4a0e29471c7091f82a6c549b4df4a85cff | |
parent | d60478318bc9c3d94703d1845c0b40504c51a8cb (diff) |
- substitute '0' for existing blank setup/recur fees
- use timelocal_nocheck instead of timelocal for proper wraparound
-rw-r--r-- | FS/FS/cust_main.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index cefc7648f..608c5e3cb 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -4,7 +4,7 @@ use strict; use vars qw( @ISA $conf $Debug $import ); use Safe; use Carp; -use Time::Local; +use Time::Local qw(timelocal_nocheck); use Date::Format; #use Date::Manip; use Business::CreditCard; @@ -994,6 +994,7 @@ sub bill { ": $setup_prog"; }; $setup_prog = $1; + $setup_prog = '0' if $setup_prog =~ /^\s*$/; #my $cpt = new Safe; ##$cpt->permit(); #what is necessary? @@ -1023,6 +1024,7 @@ sub bill { ": $recur_prog"; }; $recur_prog = $1; + $recur_prog = '0' if $recur_prog =~ /^\s*$/; # shared with $recur_prog $sdate = $cust_pkg->bill || $cust_pkg->setup || $time; @@ -1052,7 +1054,7 @@ sub bill { $mon += $part_pkg->freq; until ( $mon < 12 ) { $mon -= 12; $year++; } $cust_pkg->setfield('bill', - timelocal($sec,$min,$hour,$mday,$mon,$year)); + timelocal_nocheck($sec,$min,$hour,$mday,$mon,$year)); $cust_pkg_mod_flag = 1; } |