From: jeff Date: Fri, 24 Sep 2010 17:23:35 +0000 (+0000) Subject: set the bill date earlier X-Git-Tag: TORRUS_1_0_9~267 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=ca6c79c8b9d29c09155485ac65dffee549bd74ee set the bill date earlier --- diff --git a/bin/opensrs_domain_pkgs b/bin/opensrs_domain_pkgs index ae1476104..242009550 100755 --- a/bin/opensrs_domain_pkgs +++ b/bin/opensrs_domain_pkgs @@ -73,7 +73,23 @@ foreach my $svc_domain ( $part_export->svc_x ) { second => $second, time_zone => 'America/New_York',#timezone of opensrs ); - my $expiretime = $exp->epoch; + #my $expiretime = $exp->epoch; + + #set the bill date early enough to allow a couple chances to pay + $month--; + if ($month < 1) { + $year--; + $month=12; + } + my $bill = DateTime->new( year => $year, + month => $month, + day => 1, + hour => 0, + minute => 0, + second => 0, + time_zone => 'America/Chicago',#timezone of customer + ); + my $expiretime = $bill->epoch; my $error = $part_export->is_supported_domain($svc_domain); warn $error if $error;