X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_pkg.pm;h=7678a02956f6e65c98d25b7c25ba9bbbffb6534d;hp=0cb620932fd405bbdb67ddba21897a1b43552735;hb=5cb958cb932ef9582e9b0e542de280f2bf26197c;hpb=7b40e0e045368d350529d78208be0e6124f94b5a diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index 0cb620932..7678a0295 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -935,7 +935,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";