summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-02-16 15:30:37 -0600
committerJonathan Prykop <jonathan@freeside.biz>2015-03-02 14:46:44 -0600
commit598f5364ffaab833463442f910fc9c533975e317 (patch)
tree5f0d4823dcd25ee82a698cc922f756fa9682a600 /FS
parentefa870992fa06350b1e1d75a53b7e0c42f59f59b (diff)
RT#14671: Usage for current day when billing outstanding usage (for cancelling customers) [better supplemental package handling]
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_pkg.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 079a8657a..69f7bc0a8 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -949,7 +949,11 @@ sub cancel {
}
foreach my $supp_pkg ( $self->supplemental_pkgs ) {
- $error = $supp_pkg->cancel(%options, 'from_main' => 1);
+ if ($delay_cancel) {
+ $error = $supp_pkg->suspend(%options, 'from_main' => 1, 'reason' => undef);
+ } else {
+ $error = $supp_pkg->cancel(%options, 'from_main' => 1);
+ }
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return "canceling supplemental pkg#".$supp_pkg->pkgnum.": $error";