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

SF.net SVN: ledger-smb:[3695] trunk/LedgerSMB/IS.pm



Revision: 3695
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3695&view=rev
Author:   einhverfr
Date:     2011-09-09 21:39:17 +0000 (Fri, 09 Sep 2011)
Log Message:
-----------
Correcting bug 3402821

Modified Paths:
--------------
    trunk/LedgerSMB/IS.pm

Modified: trunk/LedgerSMB/IS.pm
===================================================================
--- trunk/LedgerSMB/IS.pm	2011-09-09 20:41:41 UTC (rev 3694)
+++ trunk/LedgerSMB/IS.pm	2011-09-09 21:39:17 UTC (rev 3695)
@@ -2400,9 +2400,9 @@
         my $dbh = $form->{dbh};
         my $sth = $dbh->prepare("SELECT on_hold from ar where ar.id = ?");
         $sth->execute($form->{id});
-        my $state = $sth->fetchrow_array;
+        my ($state) = $sth->fetchrow_array;
         my $n_s; # new state
-        if ($state[0] == 't') {
+        if ($state) {
             
             # Turn it off
             $n_s = 'f';
@@ -2412,7 +2412,7 @@
         }
         
         $sth = $dbh->prepare("update ar set on_hold = ?::boolean where ar.id = ?");
-        my $code = $sth->execute($ns, $form->{id});
+        my $code = $sth->execute($n_s, $form->{id});
         
         return 1;
         

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