X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_pkg.pm;h=8d16fe04280f6fe0c1ce96c4ffae475316ad899c;hp=5a96c15eadf3df095dd080d487abd4b114fd5520;hb=bf79875847923d0f33a2136d703dd7d9fb8c188a;hpb=66ca614efafe334e2eff37d912f786dd1121548a diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index 5a96c15ea..8d16fe042 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -2529,6 +2529,21 @@ sub change { return "transferring package notes: $error"; } } + + # transfer scheduled expire/adjourn reasons + foreach my $action ('expire', 'adjourn') { + if ( $cust_pkg->get($action) ) { + my $reason = $self->last_cust_pkg_reason($action); + if ( $reason ) { + $reason->set('pkgnum', $cust_pkg->pkgnum); + $error = $reason->replace; + if ( $error ) { + $dbh->rollback if $oldAutoCommit; + return "transferring $action reason: $error"; + } + } + } + } my @new_supp_pkgs;