projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
svcpart changes now trigger all necessary export actions, manual svcpart changing...
[freeside.git]
/
FS
/
FS
/
cust_svc.pm
diff --git
a/FS/FS/cust_svc.pm
b/FS/FS/cust_svc.pm
index
7ee9b3f
..
118ab79
100644
(file)
--- a/
FS/FS/cust_svc.pm
+++ b/
FS/FS/cust_svc.pm
@@
-172,15
+172,9
@@
sub replace {
local $FS::UID::AutoCommit = 0;
my $dbh = dbh;
local $FS::UID::AutoCommit = 0;
my $dbh = dbh;
- my $error = $new->SUPER::replace($old);
- if ( $error ) {
- $dbh->rollback if $oldAutoCommit;
- return $error if $error;
- }
-
if ( $new->svcpart != $old->svcpart ) {
my $svc_x = $new->svc_x;
if ( $new->svcpart != $old->svcpart ) {
my $svc_x = $new->svc_x;
- my $new_svc_x = ref($svc_x)->new({$svc_x->hash});
+ my $new_svc_x = ref($svc_x)->new({$svc_x->hash
, svcpart=>$new->svcpart
});
my $error = $new_svc_x->replace($svc_x);
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
my $error = $new_svc_x->replace($svc_x);
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
@@
-188,6
+182,12
@@
sub replace {
}
}
}
}
+ my $error = $new->SUPER::replace($old);
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return $error if $error;
+ }
+
$dbh->commit or die $dbh->errstr if $oldAutoCommit;
''; #no error
$dbh->commit or die $dbh->errstr if $oldAutoCommit;
''; #no error