diff options
author | ivan <ivan> | 2011-05-05 23:21:23 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-05-05 23:21:23 +0000 |
commit | dd95700348ce86de5ec76887a00f480172710950 (patch) | |
tree | ba322000f35fb9456251a7d3c1d2401a5208013c /FS | |
parent | 23206a3ac6b8a01d4acd6c9607b0f8c3f9acdfea (diff) |
fix double insert of overpayments, RT#12655
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_main/Billing_Realtime.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index 5746f4140..0dd427645 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -810,6 +810,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'} ? |