diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-06-12 02:55:14 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-06-12 02:55:14 -0700 |
commit | 20c649e7838f9448e53e0ba1c8e49820f031fc3e (patch) | |
tree | c01458ae4b9ff20db15b01fdb17bd312ab45c731 /FS/FS/cust_svc.pm | |
parent | 160885729789305b2138d3474c07c953c43234f7 (diff) |
export pkg_change hook, RT#22596
Diffstat (limited to 'FS/FS/cust_svc.pm')
-rw-r--r-- | FS/FS/cust_svc.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index 94f04e9b7..6aa254fda 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -295,6 +295,17 @@ sub replace { # } # } + #trigger a pkg_change export on pkgnum changes + if ( $new->pkgnum != $old->pkgnum ) { + my $error = $new->svc_x->export('pkg_change', $new->cust_pkg, + $old->cust_pkg, + ); + if ( $error ) { + $dbh->rollback if $oldAutoCommit; + return $error if $error; + } + } + #my $error = $new->SUPER::replace($old, @_); my $error = $new->SUPER::replace($old); if ( $error ) { |