[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1640] branches/1.2/LedgerSMB



Revision: 1640
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1640&view=rev
Author:   tetragon
Date:     2007-09-21 17:00:28 -0700 (Fri, 21 Sep 2007)

Log Message:
-----------
Some more NaN checks

Modified Paths:
--------------
    branches/1.2/LedgerSMB/AA.pm
    branches/1.2/LedgerSMB/CP.pm
    branches/1.2/LedgerSMB/IR.pm
    branches/1.2/LedgerSMB/IS.pm

Modified: branches/1.2/LedgerSMB/AA.pm
===================================================================
--- branches/1.2/LedgerSMB/AA.pm	2007-09-21 20:45:36 UTC (rev 1639)
+++ branches/1.2/LedgerSMB/AA.pm	2007-09-22 00:00:28 UTC (rev 1640)
@@ -580,7 +580,10 @@
             }
         }
     }
-
+    if ($invamount->is_nan) {
+        $dbh->rollback;
+	return;
+    }
     # save printed and queued
     $form->save_status($dbh);
 

Modified: branches/1.2/LedgerSMB/CP.pm
===================================================================
--- branches/1.2/LedgerSMB/CP.pm	2007-09-21 20:45:36 UTC (rev 1639)
+++ branches/1.2/LedgerSMB/CP.pm	2007-09-22 00:00:28 UTC (rev 1640)
@@ -518,6 +518,10 @@
             $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 @@
             $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},

Modified: branches/1.2/LedgerSMB/IR.pm
===================================================================
--- branches/1.2/LedgerSMB/IR.pm	2007-09-21 20:45:36 UTC (rev 1639)
+++ branches/1.2/LedgerSMB/IR.pm	2007-09-22 00:00:28 UTC (rev 1640)
@@ -773,6 +773,11 @@
     $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},

Modified: branches/1.2/LedgerSMB/IS.pm
===================================================================
--- branches/1.2/LedgerSMB/IS.pm	2007-09-21 20:45:36 UTC (rev 1639)
+++ branches/1.2/LedgerSMB/IS.pm	2007-09-22 00:00:28 UTC (rev 1640)
@@ -1515,6 +1515,11 @@
     $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);
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.