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:17:40 -0700 |
commit | 5b193ee2c5fae0743699adb1a28591f2a1735eb7 (patch) | |
tree | 7d8c5c87a1ff9e25d74de2876c9fe96de045b2fd /FS/FS/cust_main/Billing.pm | |
parent | 0ed195595b5c7ea404c8848d9d1881ada4214489 (diff) |
avoid generating spurious zero-amount bills on cancellation, #37229, from #16066
Diffstat (limited to 'FS/FS/cust_main/Billing.pm')
-rw-r--r-- | FS/FS/cust_main/Billing.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm index f4c8045..87be4e6 100644 --- a/FS/FS/cust_main/Billing.pm +++ b/FS/FS/cust_main/Billing.pm @@ -1107,6 +1107,14 @@ sub _make_lines { return "$@ running $method for $cust_pkg\n" if ( $@ ); + if ($recur eq 'NOTHING') { + # then calc_cancel (or calc_recur but that's not used) has declined to + # generate a recurring lineitem at all. treat this as zero, but also + # try not to generate a lineitem. + $recur = 0; + $lineitems--; + } + #base_cancel??? $unitrecur = $cust_pkg->base_recur( \$sdate ) || $recur; #XXX uuh, better |