koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 Catalogue.pm,1.30,1.31


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/C4 Catalogue.pm,1.30,1.31
Date: Mon, 03 Mar 2003 09:37:39 -0800

Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv16037/C4

Modified Files:
        Catalogue.pm 
Log Message:
bugfix for bookseller forgot and minor sql improvement

Index: Catalogue.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Catalogue.pm,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** Catalogue.pm        27 Feb 2003 16:52:01 -0000      1.30
--- Catalogue.pm        3 Mar 2003 17:37:34 -0000       1.31
***************
*** 591,598 ****
  #'
  sub ordersearch {
!       my ($search,$biblio,$catview) = @_;
        my $dbh   = C4::Context->dbh;
        my $query = "Select *,biblio.title from aqorders,biblioitems,biblio
                                                        where 
aqorders.biblioitemnumber = biblioitems.biblioitemnumber
                                                                        and 
biblio.biblionumber=aqorders.biblionumber
                                                                        and 
((datecancellationprinted is NULL)
--- 591,599 ----
  #'
  sub ordersearch {
!       my ($search,$id,$biblio,$catview) = @_;
        my $dbh   = C4::Context->dbh;
        my $query = "Select *,biblio.title from aqorders,biblioitems,biblio
                                                        where 
aqorders.biblioitemnumber = biblioitems.biblioitemnumber
+                                                                       and 
aqorders.booksellerid = '$id'
                                                                        and 
biblio.biblionumber=aqorders.biblionumber
                                                                        and 
((datecancellationprinted is NULL)
***************
*** 616,636 ****
        my $i=0;
        my @results;
        while (my $data=$sth->fetchrow_hashref){
-               my $sth2=$dbh->prepare("Select * from biblio where 
biblionumber=?");
                $sth2->execute($data->{'biblionumber'});
                my $data2=$sth2->fetchrow_hashref;
-               $sth2->finish;
                $data->{'author'}=$data2->{'author'};
                $data->{'seriestitle'}=$data2->{'seriestitle'};
!               $sth2=$dbh->prepare("Select * from aqorderbreakdown where 
ordernumber=?");
!               $sth2->execute($data->{'ordernumber'});
!               $data2=$sth2->fetchrow_hashref;
!               $sth2->finish;
!               $data->{'branchcode'}=$data2->{'branchcode'};
!               $data->{'bookfundid'}=$data2->{'bookfundid'};
                $results[$i]=$data;
                $i++;
        }
        $sth->finish;
        return($i,@results);
  }
--- 617,637 ----
        my $i=0;
        my @results;
+       my $sth2=$dbh->prepare("Select * from biblio where biblionumber=?");
+       my $sth3=$dbh->prepare("Select * from aqorderbreakdown where 
ordernumber=?");
        while (my $data=$sth->fetchrow_hashref){
                $sth2->execute($data->{'biblionumber'});
                my $data2=$sth2->fetchrow_hashref;
                $data->{'author'}=$data2->{'author'};
                $data->{'seriestitle'}=$data2->{'seriestitle'};
!               $sth3->execute($data->{'ordernumber'});
!               my $data3=$sth3->fetchrow_hashref;
!               $data->{'branchcode'}=$data3->{'branchcode'};
!               $data->{'bookfundid'}=$data3->{'bookfundid'};
                $results[$i]=$data;
                $i++;
        }
        $sth->finish;
+       $sth2->finish;
+       $sth3->finish;
        return($i,@results);
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]