From 69aeadc496d86a86bb87cf56c629c85684dcce29 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 5 May 2011 23:21:22 +0000 Subject: [PATCH] fix double insert of overpayments, RT#12655 --- FS/FS/cust_main/Billing_Realtime.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index bee1e0311..500d2c289 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -849,6 +849,7 @@ sub _realtime_bop_result { my $error = $cust_pay->insert($options{'manual'} ? ( 'manual' => 1 ) : () ); if ( $error ) { + $dbh->rollback or die $dbh->errstr if $oldAutoCommit; $cust_pay->invnum(''); #try again with no specific invnum $cust_pay->paynum(''); my $error2 = $cust_pay->insert( $options{'manual'} ? -- 2.11.0