summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-22 00:00:28 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-22 00:00:28 +0000
commit5987544295c931a8ced58a55b097b201ff559cb5 (patch)
tree9177bb5456c1c28b295bed9bcb034ef330142f30 /LedgerSMB
parent81547f3c746425592fe2659370e98990a90429a2 (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')
-rwxr-xr-xLedgerSMB/AA.pm5
-rwxr-xr-xLedgerSMB/CP.pm9
-rwxr-xr-xLedgerSMB/IR.pm5
-rwxr-xr-xLedgerSMB/IS.pm5
4 files changed, 23 insertions, 1 deletions
diff --git a/LedgerSMB/AA.pm b/LedgerSMB/AA.pm
index 5bfd0ac1..22c490dc 100755
--- a/LedgerSMB/AA.pm
+++ b/LedgerSMB/AA.pm
@@ -580,7 +580,10 @@ sub post_transaction {
}
}
}
-
+ if ($invamount->is_nan) {
+ $dbh->rollback;
+ return;
+ }
# save printed and queued
$form->save_status($dbh);
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},
diff --git a/LedgerSMB/IR.pm b/LedgerSMB/IR.pm
index 899b7939..9c6839d3 100755
--- a/LedgerSMB/IR.pm
+++ b/LedgerSMB/IR.pm
@@ -773,6 +773,11 @@ sub post_invoice {
$form->{name} =~ s/--$form->{vendor_id}//;
$form->add_shipto( $dbh, $form->{id} );
+ if ($invamount->is_nan) {
+ $dbh->rollback;
+ return;
+ }
+
my %audittrail = (
tablename => 'ap',
reference => $form->{invnumber},
diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm
index 6fc6ba81..4a462b9a 100755
--- a/LedgerSMB/IS.pm
+++ b/LedgerSMB/IS.pm
@@ -1515,6 +1515,11 @@ sub post_invoice {
$form->{name} =~ s/--$form->{customer_id}//;
$form->add_shipto( $dbh, $form->{id} );
+ if ($invamount->is_nan) {
+ $dbh->rollback;
+ return;
+ }
+
# save printed, emailed and queued
$form->save_status($dbh);