summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xLedgerSMB/OE.pm5
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' );
}