X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg.pm;h=373982b840a602657c705dddef694006dfb55178;hb=7fbe88a91e80c40c70f3e666ce1965586544c181;hp=1c30b67acd4b9150a92d87213e2b2016ca76c700;hpb=4a0ec17006cfc39c3b8272f048d7cef3533e39c0;p=freeside.git diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index 1c30b67ac..373982b84 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -1292,29 +1292,16 @@ sub calc_recur { die 'no calc_recur for '. shift->plan. "\n"; } sub calc_remain { 0; } sub calc_units { 0; } +#fallback for everything not based on flat.pm +sub recur_temporality { 'upcoming'; } +sub calc_cancel { 0; } + #fallback for everything except bulk.pm sub hide_svc_detail { 0; } #fallback for packages that can't/won't summarize usage sub sum_usage { 0; } -# somewhat more intelligent fallback-- -# covers the standard cases of billing outstanding usage or just running -# another recurring billing cycle -sub calc_cancel { - my $self = shift; - my $conf = new FS::Conf; - if ( $self->recur_temporality eq 'preceding' - and $self->option('bill_recur_on_cancel',1) ) { - return $self->calc_recur(@_); - } - elsif ( $conf->exists('bill_usage_on_cancel') # should be a package option? - and $self->can('calc_usage') ) { - return $self->calc_usage(@_); - } - 0; -} - =item recur_cost_permonth CUST_PKG recur_cost divided by freq (only supported for monthly and longer frequencies)