If itemnumber is sent to catalogue/moredetail.pl use it
If itemnumber is part of the url for catalogue/moredetail.pl put it to use. This happens in members/boraccount.pl if a fine is attached to a barcode. This patch makes moredetail.pl show only the item specified by itemnumber. Signed-off-by: Galen Charlton <galen.charlton@liblime.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This commit is contained in:
parent
fac72f1162
commit
04d8cfd655
|
|
@ -52,7 +52,6 @@ my $biblionumber=$query->param('biblionumber');
|
|||
my $title=$query->param('title');
|
||||
my $itemnumber=$query->param('itemnumber');
|
||||
my $bi=$query->param('bi');
|
||||
# $bi = $biblionumber unless $bi;
|
||||
my $data=GetBiblioData($biblionumber);
|
||||
my $dewey = $data->{'dewey'};
|
||||
|
||||
|
|
@ -85,6 +84,10 @@ $data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'};
|
|||
$results[0]=$data;
|
||||
($itemnumber) and @items = (grep {$_->{'itemnumber'} == $itemnumber} @items);
|
||||
foreach my $item (@items){
|
||||
if ( $itemnumber && $itemnumber != $item->{'itemnumber'} ) {
|
||||
undef $item;
|
||||
next;
|
||||
}
|
||||
$item->{itemlostloop}= GetAuthorisedValues(GetAuthValCode('items.itemlost',$fw),$item->{itemlost}) if GetAuthValCode('items.itemlost',$fw);
|
||||
$item->{itemdamagedloop}= GetAuthorisedValues(GetAuthValCode('items.damaged',$fw),$item->{damaged}) if GetAuthValCode('items.damaged',$fw);
|
||||
$item->{'collection'} = $ccodes->{$item->{ccode}};
|
||||
|
|
|
|||
Loading…
Reference in New Issue