projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NENA2 E911 export and batch-oriented exports in general, #14049
[freeside.git]
/
FS
/
FS
/
cust_svc.pm
diff --git
a/FS/FS/cust_svc.pm
b/FS/FS/cust_svc.pm
index
7e34f7d
..
4c38aae
100644
(file)
--- a/
FS/FS/cust_svc.pm
+++ b/
FS/FS/cust_svc.pm
@@
-323,14
+323,24
@@
sub replace {
my $error = $new->svc_x->export('pkg_change', $new->cust_pkg,
$old->cust_pkg,
);
my $error = $new->svc_x->export('pkg_change', $new->cust_pkg,
$old->cust_pkg,
);
+
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return $error if $error;
}
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return $error if $error;
}
- }
+ }
# if pkgnum is changing
#my $error = $new->SUPER::replace($old, @_);
my $error = $new->SUPER::replace($old);
#my $error = $new->SUPER::replace($old, @_);
my $error = $new->SUPER::replace($old);
+
+ #trigger a relocate export on location changes
+ if ( $new->cust_pkg->locationnum != $old->cust_pkg->locationnum ) {
+ $error ||= $new->svc_x->export('relocate',
+ $new->cust_pkg->cust_location,
+ $old->cust_pkg->cust_location,
+ );
+ }
+
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return $error if $error;
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return $error if $error;