diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-22 00:00:28 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-22 00:00:28 +0000 |
commit | 5987544295c931a8ced58a55b097b201ff559cb5 (patch) | |
tree | 9177bb5456c1c28b295bed9bcb034ef330142f30 /LedgerSMB/CP.pm | |
parent | 81547f3c746425592fe2659370e98990a90429a2 (diff) |
Some more NaN checks
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1640 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/CP.pm')
-rwxr-xr-x | LedgerSMB/CP.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/LedgerSMB/CP.pm b/LedgerSMB/CP.pm index 18ab0bde..abcf2fdd 100755 --- a/LedgerSMB/CP.pm +++ b/LedgerSMB/CP.pm @@ -518,6 +518,10 @@ sub post_payment { $sth->execute( $amount, $form->{datepaid}, $form->{"id_$i"} ) || $form->dberror( $query, 'CP.pm', 530 ); + if ($amount->is_nan) { + $dbh->rollback; + return; + } %audittrail = ( tablename => $form->{arap}, reference => $form->{source}, @@ -793,6 +797,11 @@ sub post_payments { $sth->execute( $amount, $form->{datepaid}, $form->{"id_$i"} ) || $form->dberror( $query, 'CP.pm', 796 ); + if ($amount->is_nan) { + $dbh->rollback; + return; + } + %audittrail = ( tablename => $form->{arap}, reference => $form->{source}, |