[Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.31,1.32
Paul POULAIN
tipaul at users.sourceforge.net
Thu Nov 18 11:34:27 CET 2004
- Previous message: [Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/circ circulation.tmpl,1.33,1.34
- Next message: [Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/help/admin aqbookfund.tmpl,NONE,1.1 authorised_values.tmpl,NONE,1.1 branches.tmpl,NONE,1.1 categorie.tmpl,NONE,1.1 checkmarc.tmpl,NONE,1.1 currency.tmpl,NONE,1.1 issuingrules.tmpl,NONE,1.1 koha2marclinks.tmpl,NONE,1.1 marc_subfields_structure.tmpl,NONE,1.1 marctagstructure.tmpl,NONE,1.1 printers.tmpl,NONE,1.1 stopwords.tmpl,NONE,1.1 systempreferences.tmpl,NONE,1.1 z3950servers.tmpl,NONE,1.1 itemtypes.tmpl,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28279/C4
Modified Files:
SearchMarc.pm
Log Message:
fixing but to remove "request" link on "notforloan" materials
Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** SearchMarc.pm 5 Nov 2004 10:10:48 -0000 1.31
--- SearchMarc.pm 18 Nov 2004 10:34:24 -0000 1.32
***************
*** 320,327 ****
my $counter = $offset;
# HINT : biblionumber as bn is important. The hash is fills biblionumber with items.biblionumber.
! # so if you dont' has an item, you get a not nice epty value.
! $sth = $dbh->prepare("SELECT biblio.biblionumber as bn,biblio.*, biblioitems.*,marc_biblio.bibid
FROM biblio, marc_biblio
LEFT JOIN biblioitems on biblio.biblionumber = biblioitems.biblionumber
WHERE biblio.biblionumber = marc_biblio.biblionumber AND bibid = ?");
my @finalresult = ();
--- 320,328 ----
my $counter = $offset;
# HINT : biblionumber as bn is important. The hash is fills biblionumber with items.biblionumber.
! # so if you dont' has an item, you get a not nice empty value.
! $sth = $dbh->prepare("SELECT biblio.biblionumber as bn,biblio.*, biblioitems.*,marc_biblio.bibid,itemtypes.notforloan
FROM biblio, marc_biblio
LEFT JOIN biblioitems on biblio.biblionumber = biblioitems.biblionumber
+ LEFT JOIN itemtypes on itemtypes.itemtype=biblioitems.itemtype
WHERE biblio.biblionumber = marc_biblio.biblionumber AND bibid = ?");
my @finalresult = ();
***************
*** 330,334 ****
my $oldline;
my ($oldbibid, $oldauthor, $oldtitle);
! my $sth_itemCN = $dbh->prepare("select * from items where biblionumber=?");
my $sth_issue = $dbh->prepare("select date_due,returndate from issues where itemnumber=?");
# parse all biblios between start & end.
--- 331,335 ----
my $oldline;
my ($oldbibid, $oldauthor, $oldtitle);
! my $sth_itemCN = $dbh->prepare("select items.* from items where biblionumber=?");
my $sth_issue = $dbh->prepare("select date_due,returndate from issues where itemnumber=?");
# parse all biblios between start & end.
***************
*** 338,341 ****
--- 339,343 ----
my $continue=1;
my $line = $sth->fetchrow_hashref;
+ warn "==> ".$line->{notforloan};
my $biblionumber=$line->{bn};
# $continue=0 unless $line->{bn};
***************
*** 343,346 ****
--- 345,349 ----
$sth_itemCN->execute($biblionumber);
my @CNresults = ();
+ my $notforloan=1; # to see if there is at least 1 item that can be issued
while (my $item = $sth_itemCN->fetchrow_hashref) {
# parse the result, putting holdingbranch & itemcallnumber in separate array
***************
*** 361,364 ****
--- 364,368 ----
$lineCN{location} = $item->{location};
$lineCN{date_due} = format_date($date_due);
+ $notforloan=0 unless ($item->{notforloan} or $item->{wthdrawn} or $item->{itemlost});
push @CNresults,\%lineCN;
$totalitems++;
***************
*** 369,372 ****
--- 373,379 ----
$newline{totitem} = $totalitems;
$newline{biblionumber} = $biblionumber;
+ $newline{norequests} = 0;
+ $newline{norequests} = 1 if ($line->{notforloan}); # itemtype not issuable
+ $newline{norequests} = 1 if (!$line->{notforloan} && $notforloan); # itemtype issuable but all items not issuable for instance
my @CNresults2= @CNresults;
$newline{CN} = \@CNresults2;
- Previous message: [Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/circ circulation.tmpl,1.33,1.34
- Next message: [Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/help/admin aqbookfund.tmpl,NONE,1.1 authorised_values.tmpl,NONE,1.1 branches.tmpl,NONE,1.1 categorie.tmpl,NONE,1.1 checkmarc.tmpl,NONE,1.1 currency.tmpl,NONE,1.1 issuingrules.tmpl,NONE,1.1 koha2marclinks.tmpl,NONE,1.1 marc_subfields_structure.tmpl,NONE,1.1 marctagstructure.tmpl,NONE,1.1 printers.tmpl,NONE,1.1 stopwords.tmpl,NONE,1.1 systempreferences.tmpl,NONE,1.1 z3950servers.tmpl,NONE,1.1 itemtypes.tmpl,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Koha-cvs
mailing list