X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2Fpart_pkg%2Fflat.pm;h=504def0cf9bf58ab19e3e0badaca3238ad96337c;hb=6eec422e339e7a7209cac18da71ba598ee18d7d2;hp=84599ea8ade19a23467ba1ee6a8cc97d71b6304a;hpb=0cd91e6625848b1ccf72b4b80bd18b3a1c66bbee;p=freeside.git diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm index 84599ea8a..504def0cf 100644 --- a/FS/FS/part_pkg/flat.pm +++ b/FS/FS/part_pkg/flat.pm @@ -173,6 +173,12 @@ sub calc_recur { sub cutoff_day { my $self = shift; my $cust_pkg = shift; + my $cust_main = $cust_pkg->cust_main; + # force it to act like a prorate package, is what this means + # because we made a distinction once between prorate and flat packages + if ( $cust_main->force_prorate_day and $cust_main->prorate_day ) { + return ( $cust_main->prorate_day ); + } if ( $self->option('sync_bill_date',1) ) { my $next_bill = $cust_pkg->cust_main->next_bill_date; if ( $next_bill ) { @@ -225,6 +231,8 @@ sub calc_cancel { } } +# no longer used; see credit_remaining in FS::cust_pkg + sub calc_remain { my ($self, $cust_pkg, %options) = @_;