[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.31,1.32
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.31,1.32 |
Date: |
Thu, 18 Nov 2004 02:34:27 -0800 |
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} = address@hidden;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.31,1.32,
Paul POULAIN <=
- Prev by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/circ circulation.tmpl,1.33,1.34
- Next by Date:
[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
- Previous by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/circ circulation.tmpl,1.33,1.34
- Next by thread:
[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
- Index(es):