#!/usr/bin/perl #script to display detailed information #written 8/11/99 use strict; #use DBI; use C4::Search; use C4::Koha; use C4::Output; use C4::Acquisitions; use C4::Biblio; use CGI; my $input = new CGI; print $input->header; #whether it is called from the opac of the intranet my $type=$input->param('type'); #setup colours my $main; my $secondary; if ($type eq 'opac'){ $main='#99cccc'; $secondary='#efe5ef'; } else { $main='#cccc99'; $secondary='#ffffcc'; } print startpage(); print startmenu($type); my $blah; my $bib=$input->param('bib'); my $title=$input->param('title'); my $bi=$input->param('bi'); my $data=bibitemdata($bi); my (@items)=itemissues($bi); my ($order,$ordernum)=getorder($bi,$bib); #print @items; my $count=@items; my $i=0; print center(); my $dewey = $data->{'dewey'}; $dewey =~ s/0+$//; if ($dewey eq "000.") { $dewey = "";}; if ($dewey < 10){$dewey='00'.$dewey;} if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;} if ($dewey <= 0){ $dewey=''; } $dewey=~ s/\.$//; print < printend ; if ($type eq 'catmain'){ print "Catalogue Maintenance
"; } print <$data->{'title'} ($data->{'author'})

$data->{'biblioitemnumber'} GROUP - $data->{'description'}

Biblionumber: $bib
Item Type: $data->{'itemtype'}
Loan Length: $data->{'loanlength'}
Rental Charge: $data->{'rentalcharge'}
Classification: $data->{'classification'}$dewey$data->{'subclass'}
ISBN: $data->{'isbn'}
Publisher: $data->{'publishercode'}
Place: $data->{'place'}
Date: $data->{'publicationyear'}
Volume: $data->{'volumeddesc'}
Pages: $data->{'pages'}
Illus: $data->{'illus'}
Size: $data->{'size'}
Notes: $data->{'bnotes'}
No. of Items: $count printend ; if ($type eq 'catmain'){ print "
{'biblioitemnumber'}&bib=$data->{'biblionumber'}>Shift to another biblio"; } print <
printend ; for (my $i=0;$i<$count;$i++){ print <
BARCODE $items[$i]->{'barcode'}
{'itemnumber'}>
printend ; $items[$i]->{'itemlost'}=~ s/0/No/; $items[$i]->{'itemlost'}=~ s/1/Yes/; $items[$i]->{'withdrawn'}=~ s/0/No/; $items[$i]->{'withdrawn'}=~ s/1/Yes/; $items[$i]->{'replacementprice'}+=0.00; my $year=substr($items[$i]->{'timestamp0'},0,4); my $mon=substr($items[$i]->{'timestamp0'},4,2); my $day=substr($items[$i]->{'timestamp0'},6,2); $items[$i]->{'timestamp0'}="$day/$mon/$year"; $items[$i]->{'dateaccessioned'} = slashifyDate($items[$i]->{'dateaccessioned'}); $items[$i]->{'datelastseen'} = slashifyDate($items[$i]->{'datelastseen'}); print < Home Branch: $items[$i]->{'homebranch'}
Last seen: $items[$i]->{'datelastseen'}
Last borrowed: $items[$i]->{'timestamp0'}
printend ; if ($items[$i] eq 'Available'){ print "Currently on issue to:
"; } else { print "Currently on issue to: {'borrower0'}>$items[$i]->{'card'}
"; } print <Last Borrower 1: $items[$i]->{'card0'}
Last Borrower 2: $items[$i]->{'card1'}
Current Branch: $items[$i]->{'holdingbranch'}
Replacement Price: $items[$i]->{'replacementprice'}
Item lost: $items[$i]->{'itemlost'}
Paid for: $items[$i]->{'paidfor'}
Notes: $items[$i]->{'itemnotes'}
Renewals: $items[$i]->{'renewals'}
{'booksellerinvoicenumber'}&catview=yes>Accession Date: $items[$i]->{'dateaccessioned'}
printend ; if ($items[$i]->{'wthdrawn'} eq '1'){ $items[$i]->{'wthdrawn'}="Yes"; } else { $items[$i]->{'wthdrawn'}="No"; } print <Cancelled: $items[$i]->{'wthdrawn'}
Total Issues: $items[$i]->{'issues'}
Group Number: $bi
Biblio number: $bib
printend ; } print < printend ; print endcenter(); print endmenu($type); print endpage();