summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-22 00:03:34 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-22 00:03:34 +0000
commit3eeccd069dfc98031fdfe0bcc7e12c8893705d91 (patch)
tree7dab6deceadd3c3e3eb59ef6a63f7e85d28f9119
parent5987544295c931a8ced58a55b097b201ff559cb5 (diff)
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
-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' );
}