diff options
-rwxr-xr-x | LedgerSMB/OE.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/LedgerSMB/OE.pm b/LedgerSMB/OE.pm index 08d3bac8..6ced7f1d 100755 --- a/LedgerSMB/OE.pm +++ b/LedgerSMB/OE.pm @@ -594,6 +594,11 @@ sub save { $sth = $dbh->prepare($query); $sth->execute(@queryargs) || $form->dberror($query); + if ( $amount->is_nan ) { + $dbh->rollback; + return; + } + if ( !$did_insert ) { @queries = $form->run_custom_queries( 'oe', 'UPDATE' ); } |