-# 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;
-}
-