diff options
author | Mark Wells <mark@freeside.biz> | 2015-07-10 18:14:40 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-07-10 18:15:12 -0700 |
commit | ac3329e210b11172d56fd987624a1a85c3bcfeb9 (patch) | |
tree | 2365d9352504922f8ad717815740093ccd3ee081 /FS/FS/part_pkg | |
parent | 88bf5db0cca989c51237c661a13078eef08b3674 (diff) |
avoid generating spurious zero-amount bills on cancellation, #37229, from #16066
Diffstat (limited to 'FS/FS/part_pkg')
-rw-r--r-- | FS/FS/part_pkg/flat.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm index 930966a..eb70253 100644 --- a/FS/FS/part_pkg/flat.pm +++ b/FS/FS/part_pkg/flat.pm @@ -220,13 +220,13 @@ sub calc_cancel { and $self->option('bill_recur_on_cancel', 1) ) { # run another recurring cycle return $self->calc_recur(@_); - } - elsif ( $conf->exists('bill_usage_on_cancel') # should be a package option? + } elsif ( $conf->exists('bill_usage_on_cancel') # should be a package option? and $self->can('calc_usage') ) { # bill for outstanding usage return $self->calc_usage(@_); + } else { + return 'NOTHING'; # numerically zero, but has special meaning } - 0; } sub calc_remain { |