[Koha-cvs] CVS: koha/C4 Search.pm,1.18.2.22,1.18.2.23

Finlay Thompson finlayt at users.sourceforge.net
Wed Dec 11 04:56:48 CET 2002


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

Modified Files:
      Tag: rel-1-2
	Search.pm 
Log Message:

Fixed bug in itemcount2 that meant that items on order wernt getting counted.


Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.18.2.22
retrieving revision 1.18.2.23
diff -C2 -r1.18.2.22 -r1.18.2.23
*** Search.pm	7 Dec 2002 07:07:00 -0000	1.18.2.22
--- Search.pm	11 Dec 2002 03:56:45 -0000	1.18.2.23
***************
*** 2163,2170 ****
    my ($env,$bibnum,$type)=@_; 
    my $dbh=C4Connect;   
!   my $query="SELECT items.*, branches.branchname FROM items LEFT JOIN branches ON items.holdingbranch = branches.branchcode WHERE biblionumber = ?";
    if ($type ne 'intra'){
      $query.=" and ((itemlost <>1 and itemlost <> 2) or itemlost is NULL) and
!     (wthdrawn <> 1 or wthdrawn is NULL)";      
    }
    my $sth=$dbh->prepare($query);         
--- 2163,2173 ----
    my ($env,$bibnum,$type)=@_; 
    my $dbh=C4Connect;   
!   my $query = "SELECT items.*, branches.branchname 
!                  FROM items LEFT JOIN branches 
!                                    ON items.holdingbranch = branches.branchcode 
!                 WHERE biblionumber = ?";
    if ($type ne 'intra'){
      $query.=" and ((itemlost <>1 and itemlost <> 2) or itemlost is NULL) and
!                   (wthdrawn <> 1 or wthdrawn is NULL)";      
    }
    my $sth=$dbh->prepare($query);         
***************
*** 2197,2201 ****
    if ($bibnum) {
        my $query2="Select * from aqorders where biblionumber=$bibnum and
!       datecancellationprinted is NULL and quantity > quantityreceived";
        my $sth2=$dbh->prepare($query2);
        $sth2->execute;
--- 2200,2204 ----
    if ($bibnum) {
        my $query2="Select * from aqorders where biblionumber=$bibnum and
!       (datecancellationprinted is NULL or datecancellationprinted ='')";
        my $sth2=$dbh->prepare($query2);
        $sth2->execute;





More information about the Koha-cvs mailing list