X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fflat.pm;h=f9d1b4e193628d2b717b5140d8005cf84f511e6b;hb=51fa32c6d1d22d4b78afd4bf12e307fbdacc6062;hp=b5e0fa023271b27af58fc2962d1349de9eb16d20;hpb=d3ce5efd1ec0e1a715a154696e2b0aa86e51c27b;p=freeside.git diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm index b5e0fa023..f9d1b4e19 100644 --- a/FS/FS/part_pkg/flat.pm +++ b/FS/FS/part_pkg/flat.pm @@ -107,7 +107,7 @@ sub calc_recur { return 0 if $self->option('recur_temporality', 1) eq 'preceding' && $last_bill == 0; - my $charge = $self->base_recur($cust_pkg); + my $charge = $self->base_recur($cust_pkg, $sdate); if ( $self->option('sync_bill_date',1) ) { my $next_bill = $cust_pkg->cust_main->next_bill_date; if ( defined($next_bill) ) { @@ -127,7 +127,7 @@ sub calc_recur { } sub base_recur { - my($self, $cust_pkg) = @_; + my($self, $cust_pkg, $sdate) = @_; $self->option('recur_fee', 1) || 0; } @@ -151,7 +151,7 @@ sub calc_remain { my $next_bill = $cust_pkg->getfield('bill') || 0; - return 0 if ! $self->base_recur($cust_pkg) + return 0 if ! $self->base_recur($cust_pkg, \$time) || ! $next_bill || $next_bill < $time;