summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
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";