X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_pkg.pm;h=305ad63a6a92c339637032cb565685319d612d4b;hb=7ed03cd3b992a5df6c786686a5271eea65611dbc;hp=d0d62bd6a886993a1dea0aaa66cf3b4aad669cb5;hpb=7f1bc260ca39c9a8ab53d24b51dc5610d893a76a;p=freeside.git diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm index d0d62bd6a..305ad63a6 100644 --- a/FS/FS/cust_bill_pkg.pm +++ b/FS/FS/cust_bill_pkg.pm @@ -499,13 +499,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;