[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Search.pm,1.28,1.29
From: |
Finlay Thompson |
Subject: |
[Koha-cvs] CVS: koha/C4 Search.pm,1.28,1.29 |
Date: |
Wed, 05 Jun 2002 21:15:21 -0700 |
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv30020/C4
Modified Files:
Search.pm
Log Message:
fixed bug http://bugzilla.katipo.co.nz/show_bug.cgi?id=1284
If an item doesnt have a holdingbranch it just shows blank instead of not
appearing at all.
Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** Search.pm 21 May 2002 01:17:44 -0000 1.28
--- Search.pm 6 Jun 2002 04:15:18 -0000 1.29
***************
*** 640,649 ****
my ($env,$biblionumber,$type) = @_;
my $dbh = &C4Connect;
! my $query = "Select * from items, biblio, biblioitems, branches
! where (items.biblioitemnumber = biblioitems.biblioitemnumber)
! and biblioitems.biblionumber = biblio.biblionumber
! and biblio.biblionumber = '$biblionumber'
! and branches.branchcode = items.holdingbranch";
!
if ($type ne 'intra'){
$query .= " and ((items.itemlost<>1 and items.itemlost <> 2)
--- 640,647 ----
my ($env,$biblionumber,$type) = @_;
my $dbh = &C4Connect;
! my $query = "SELECT * FROM items, biblio, biblioitems
! WHERE items.biblionumber = '$biblionumber'
! AND biblioitems.biblioitemnumber = items.biblioitemnumber
! AND biblio.biblionumber = items.biblionumber";
if ($type ne 'intra'){
$query .= " and ((items.itemlost<>1 and items.itemlost <> 2)
***************
*** 652,655 ****
--- 650,654 ----
}
$query .= " order by items.dateaccessioned desc";
+ warn $query;
my $sth=$dbh->prepare($query);
$sth->execute;
***************
*** 676,686 ****
if ($datedue eq ''){
$datedue="Available";
! my
($rescount,$reserves)=Findgroupreserve($data->{'biblioitemnumber'},$biblionumber);
!
! if ($rescount >0){
! $datedue='Request';
}
}
$isth->finish;
my $class = $data->{'classification'};
my $dewey = $data->{'dewey'};
--- 675,693 ----
if ($datedue eq ''){
$datedue="Available";
! my ($restype,$reserves)=CheckReserves($data->{'itemnumber'});
! if ($restype){
! $datedue=$restype;
}
}
$isth->finish;
+ #get branch information.....
+ my $bquery = "SELECT * FROM branches
+ WHERE branchcode = '$data->{'holdingbranch'}'";
+ my $bsth=$dbh->prepare($bquery);
+ $bsth->execute;
+ if (my $bdata=$bsth->fetchrow_hashref){
+ $data->{'branchname'} = $bdata->{'branchname'};
+ }
+
my $class = $data->{'classification'};
my $dewey = $data->{'dewey'};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Search.pm,1.28,1.29,
Finlay Thompson <=
- Prev by Date:
[Koha-cvs] CVS: koha/circ branchtransfers.pl,1.8,1.9 circulation.pl,1.26,1.27 returns.pl,1.4,1.5
- Next by Date:
[Koha-cvs] CVS: koha/acqui.simple marcimport.pl,1.6.2.12,1.6.2.13
- Previous by thread:
[Koha-cvs] CVS: koha/circ branchtransfers.pl,1.8,1.9 circulation.pl,1.26,1.27 returns.pl,1.4,1.5
- Next by thread:
[Koha-cvs] CVS: koha/acqui.simple marcimport.pl,1.6.2.12,1.6.2.13
- Index(es):