From 3eeccd069dfc98031fdfe0bcc7e12c8893705d91 Mon Sep 17 00:00:00 2001 From: tetragon Date: Sat, 22 Sep 2007 00:03:34 +0000 Subject: Adding another NaN check git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1641 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/OE.pm | 5 +++++ 1 file changed, 5 insertions(+) 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' ); } -- cgit v1.2.3