summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/gl.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/gl.pl b/bin/gl.pl
index 218c5bb2..ce69f677 100755
--- a/bin/gl.pl
+++ b/bin/gl.pl
@@ -1343,7 +1343,8 @@ sub post {
$credit += $cr;
}
- if ( $form->round_amount( $debit, 2 ) != $form->round_amount( $credit, 2 ) )
+ if ($form->round_amount( $debit, 2 ) != $form->round_amount( $credit, 2 ) ||
+ $debit->is_nan || $credit->is_nan)
{
$form->error( $locale->text('Out of balance transaction!') );
}