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

SF.net SVN: ledger-smb:[3592] trunk/LedgerSMB/RP.pm



Revision: 3592
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3592&view=rev
Author:   ehuelsmann
Date:     2011-07-29 20:17:15 +0000 (Fri, 29 Jul 2011)

Log Message:
-----------
Follow up to r3591: concatenate several rows of the same type;
before 3591, only a single row was returned, meaning only one value for each.

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

Modified: trunk/LedgerSMB/RP.pm
===================================================================
--- trunk/LedgerSMB/RP.pm	2011-07-29 19:38:45 UTC (rev 3591)
+++ trunk/LedgerSMB/RP.pm	2011-07-29 20:17:15 UTC (rev 3592)
@@ -1882,8 +1882,10 @@
     $sth = $dbh->prepare($query);
     $sth->execute( $form->{"$form->{ct}_id"} );
     while (my $ref = $sth->fetchrow_hashref('NAME_lc')){
-        $form->{ $form->{ct} } = $ref->{name};
-        $form->{ lc($ref->{class}) } = $ref->{contact};
+        $form->{ $form->{ct} } .=
+	    ($form->{ $form{ct} } ? ", " : "") . $ref->{name};
+        $form->{ lc($ref->{class}) } .=
+	    ($form->{ lc($ref->{class}) } ? ", " : "") . $ref->{contact};
     }
 
     $dbh->commit;


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