summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2003-05-10 05:39:24 +0000
committerivan <ivan>2003-05-10 05:39:24 +0000
commita5c62dfdff61cde56fd92011c51482ba5985eba7 (patch)
tree111206cf7640feae60efa50dbe4f81cfad67c0d4
parent944f675cc816c0f5d1e5ee18cdee210b2438a3cf (diff)
important fixes backported from 1.5:
- substitute '0' for existing blank setup/recur fees - use timelocal_nocheck instead of timelocal for proper wraparound
-rw-r--r--FS/FS/cust_main.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index c5a5982d3..1c12e7b63 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;
@@ -953,6 +953,7 @@ sub bill {
": $setup_prog";
};
$setup_prog = $1;
+ $setup_prog = '0' if $setup_prog =~ /^\s*$/;
#my $cpt = new Safe;
##$cpt->permit(); #what is necessary?
@@ -982,6 +983,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;
@@ -1011,7 +1013,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;
}