summaryrefslogtreecommitdiff
path: root/FS/FS/svc_Common.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-12-09 23:37:20 -0800
committerIvan Kohler <ivan@freeside.biz>2013-12-09 23:37:20 -0800
commit8c39c41a00e15164ea306bfd73b2ae187dade9a5 (patch)
tree01e5f6317530d28d3e17ca5bf23319ad962e32e5 /FS/FS/svc_Common.pm
parent2083f6fb050747ad589a6e1dd15a3f513e9e6ee4 (diff)
on-the-fly alarm vendor / type / CS adding, RT#23694
Diffstat (limited to 'FS/FS/svc_Common.pm')
-rw-r--r--FS/FS/svc_Common.pm14
1 files changed, 5 insertions, 9 deletions
diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm
index 3993d3d..56567e8 100644
--- a/FS/FS/svc_Common.pm
+++ b/FS/FS/svc_Common.pm
@@ -335,6 +335,7 @@ sub preinsert_hook_first { ''; }
sub _check_duplcate { ''; }
sub preinsert_hook { ''; }
sub table_dupcheck_fields { (); }
+sub prereplace_hook { ''; }
sub predelete_hook { ''; }
sub predelete_hook_first { ''; }
@@ -472,15 +473,10 @@ sub replace {
local $FS::UID::AutoCommit = 0;
my $dbh = dbh;
- my $error = $new->set_auto_inventory($old);
- if ( $error ) {
- $dbh->rollback if $oldAutoCommit;
- return $error;
- }
-
- #redundant, but so any duplicate fields are maniuplated as appropriate
- # (svc_phone.phonenum)
- $error = $new->check;
+ my $error = $new->prereplace_hook_first($old)
+ || $new->set_auto_inventory($old)
+ || $new->check; #redundant, but so any duplicate fields are
+ #maniuplated as appropriate (svc_phone.phonenum)
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return $error;