X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fprorate_Mixin.pm;h=9e97cc593cbea52ba1b880ccb5a8365bec41b594;hp=beae6d805e62f2a525d9c87c5d9671b3da7d9fa0;hb=66ce0d96048636c55a7f7e5b4965bbe68565bde2;hpb=d16673493b44b0ee6781096938baed32e8012a99 diff --git a/FS/FS/part_pkg/prorate_Mixin.pm b/FS/FS/part_pkg/prorate_Mixin.pm index beae6d805..9e97cc593 100644 --- a/FS/FS/part_pkg/prorate_Mixin.pm +++ b/FS/FS/part_pkg/prorate_Mixin.pm @@ -2,6 +2,7 @@ package FS::part_pkg::prorate_Mixin; use strict; use vars qw( %info ); +use Tie::IxHash; use Time::Local qw( timelocal timelocal_nocheck ); use Date::Format qw( time2str ); use List::Util qw( min ); @@ -107,7 +108,8 @@ sub calc_prorate { ) { #warn "[calc_prorate] #".$cust_pkg->pkgnum.": running deferred setup\n"; - $param->{'setup_fee'} = $self->calc_setup($cust_pkg, $$sdate, $details); + $param->{'setup_fee'} = $self->calc_setup($cust_pkg, $$sdate, $details) + unless $cust_pkg->{'Hash'}->{'waive_setup'}; $mnow = $cust_pkg->setup; $add_period = 1; } @@ -203,7 +205,7 @@ sub prorate_setup { # For some reason (probably user override), the bill date has been set even # though the package isn't billing yet. Start billing as though that was the # start date. - $sdate = $cust_pkg->bill; + $$sdate = $cust_pkg->bill; $cust_pkg->setup($cust_pkg->bill); } # Now figure the start and end of the period that contains the start date.