summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_bill_pkg.pm9
1 files changed, 2 insertions, 7 deletions
diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm
index 70dbcde2a..de76b0a29 100644
--- a/FS/FS/cust_bill_pkg.pm
+++ b/FS/FS/cust_bill_pkg.pm
@@ -459,13 +459,8 @@ sub delete {
#not adding a cc surcharge, but this override lets us modify charged
$cust_bill->{'Hash'}{'cc_surcharge_replace_hack'} = 1;
- my $error = $cust_bill->replace;
- if ( $error ) {
- $dbh->rollback if $oldAutoCommit;
- return $error;
- }
-
- my $error = $self->SUPER::delete(@_);
+ my $error = $cust_bill->replace
+ || $self->SUPER::delete(@_);
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return $error;