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

SF.net SVN: ledger-smb:[3232] trunk/LedgerSMB/Form.pm



Revision: 3232
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3232&view=rev
Author:   ehuelsmann
Date:     2011-06-13 08:49:55 +0000 (Mon, 13 Jun 2011)

Log Message:
-----------
Remove section of code which can't be triggered.

 * LedgerSMB/Form.pm (all_vc): Because vclimit isn't defined (and thus
     interpreted as being zero (0), the condition in the 'if' statement
     never will be true.

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

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2011-06-13 08:04:57 UTC (rev 3231)
+++ trunk/LedgerSMB/Form.pm	2011-06-13 08:49:55 UTC (rev 3232)
@@ -1905,38 +1905,14 @@
 
     $sth->finish;
 
-    # build selection list
-    if ( $count < $myconfig->{vclimit} ) {
-
-        $self->{"${vc}_id"} *= 1;
-
-	# TODO:  Alter this so that it pulls up the entity_credit_account 
-	# instead of the entity_id.  --CT
+    if ($self->{id}) {
+	### fixme: the segment below assumes that the form ID is a
+	# credit account id, which it isn't necessarily (maybe never?)
+	# when called from bin/oe.pl, it's an order id.
         $query = qq|
 		SELECT ec.id, e.name
 		  FROM entity e
 		  JOIN entity_credit_account ec ON (ec.entity_id = e.id)
-		 WHERE ec.id = ? OR $where
-		ORDER BY name|;
-
-        push( @queryargs, $self->{"${vc}_id"} );
-
-        $sth = $dbh->prepare($query);
-        $sth->execute(@queryargs) || $self->dberror($query);
-
-        @{ $self->{"all_$vc"} } = ();
-
-        while ( $ref = $sth->fetchrow_hashref('NAME_lc') ) {
-            push @{ $self->{"all_$vc"} }, $ref;
-        }
-
-        $sth->finish;
-
-    } elsif ($self->{id}) {
-        $query = qq|
-		SELECT ec.id, e.name
-		  FROM entity e
-		  JOIN entity_credit_account ec ON (ec.entity_id = e.id)
 		 WHERE ec.id = (select entity_credit_account FROM $table
 				WHERE id = ?)
 		ORDER BY name|;


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