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

SF.net SVN: ledger-smb:[3977] trunk/LedgerSMB/PE.pm



Revision: 3977
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3977&view=rev
Author:   ehuelsmann
Date:     2011-11-10 22:35:18 +0000 (Thu, 10 Nov 2011)
Log Message:
-----------
Fix name of table to query from - reported by haso on irc.

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

Modified: trunk/LedgerSMB/PE.pm
===================================================================
--- trunk/LedgerSMB/PE.pm	2011-11-10 22:34:03 UTC (rev 3976)
+++ trunk/LedgerSMB/PE.pm	2011-11-10 22:35:18 UTC (rev 3977)
@@ -1720,10 +1720,10 @@
     my $self  = shift @_;
     my $form  = shift @_;
     my $dbh   = $form->{dbh};
-    my $query = qq|SELECT curr FROM customer WHERE id = ?|;
-    my $sth   = $dbh->prepare($query);
-    $sth->execute( $form->{customer_id} );
-    my ($curr) = $sth->fetchrow_array;
+    my $query = qq|SELECT curr FROM entity_credit_account WHERE id = ?|;
+    my $sth   = $dbh->prepare($query) || $form->dberror($query);
+    $sth->execute( $form->{customer_id} ) || $form->dberror($query);
+    my ($curr) = $sth->fetchrow_array || $form->dberror($query);
     $form->{currency} = $curr;
 }
 

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