#!/usr/bin/perl #script to modify/delete groups #written 8/11/99 # modified 11/11/99 by chris@katipo.co.nz # modified 18/4/00 by chris@katipo.co.nz use strict; use C4::Search; use C4::Output; use C4::Koha; use CGI; my $input = new CGI; # my $bibitemnum=$input->param('bibitem'); my $data=bibitemdata($bibitemnum); my $biblio=$input->param('biblio'); my $submit=$input->param('submit.x'); if ($submit eq ''){ print $input->redirect("/cgi-bin/koha/delbibitem.pl?bibitemnum=$bibitemnum&biblio=$biblio"); } print $input->header; #my ($count,$subject)=subject($data->{'biblionumber'}); #my ($count2,$subtitle)=subtitle($data->{'biblionumber'}); #my ($count3,$addauthor)=addauthor($data->{'biblionumber'}); #my ($analytictitle)=analytic($biblionumber,'t'); #my ($analyticauthor)=analytic($biblionumber,'a'); print startpage(); print startmenu(); my %inputs; #hash is set up with input name being the key then #the value is a tab separated list, the first item being the input type #$inputs{'Author'}="text\t$data->{'author'}\t0"; #$inputs{'Title'}="text\t$data->{'title'}\t1"; 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/\.$//; $inputs{'Class'}="text\t$data->{'classification'}$dewey$data->{'subclass'}\t2"; $inputs{'Item Type'}="text\t$data->{'itemtype'}\t3"; #$inputs{'Subject'}="textarea\t$sub\t4"; $inputs{'Publisher'}="text\t$data->{'publishercode'}\t5"; #$inputs{'Copyright date'}="text\t$data->{'copyrightdate'}\t6"; $inputs{'ISBN'}="text\t$data->{'isbn'}\t7"; $inputs{'Publication Year'}="text\t$data->{'publicationyear'}\t8"; $inputs{'Pages'}="text\t$data->{'pages'}\t9"; $inputs{'Illustrations'}="text\t$data->{'illustration'}\t10"; #$inputs{'Series Title'}="text\t$data->{'seriestitle'}\t11"; #$inputs{'Additional Author'}="text\t$additional\t12"; #$inputs{'Subtitle'}="text\t$subtitle->[0]->{'subtitle'}\t13"; #$inputs{'Unititle'}="text\t$data->{'unititle'}\t14"; #$inputs{'Notes'}="textarea\t$data->{'notes'}\t15"; #$inputs{'Serial'}="text\t$data->{'serial'}\t16"; $inputs{'Volume'}="text\t$data->{'volumeddesc'}\t17"; #$inputs{'Analytic author'}="text\t\t18"; #$inputs{'Analytic title'}="text\t\t19"; $inputs{'bibnum'}="hidden\t$data->{'biblionumber'}\t20"; $inputs{'bibitemnum'}="hidden\t$data->{'biblioitemnumber'}\t21"; print < {'biblionumber'}&type=intra>$data->{'title'} ($data->{'author'})
Modify Group - $data->{'description'}

printend ; my ($count,@bibitems)=bibitems($data->{'biblionumber'}); print ""; my $notesinput=$input->textfield(-name=>'Notes', -default=>$data->{'bnotes'}, -size=>20); print <
RE-ASSIGN TO EXISTING GROUP
OR MODIFY DETAILS
Item Type
Class
Publisher
Place
ISBN
Publication Year
Pages
Illustrations
Volume
Notes $notesinput
Size
printend ; print < printend ; my (@items)=itemissues($data->{'biblioitemnumber'}); #print @items; my $count=@items; for (my $i=0;$i<$count;$i++){ $items[$i]->{'datelastseen'} = slashifyDate($items[$i]->{'datelastseen'}); print < printend ; } print <

HELP: You must click on the appropriate radio button (in the green boxes), and choose to either re-assign the item/s to a record already in the system, or modify this record. IF your changes only apply to some items, tick the appropriate ones and a new group record will be created automatically for them.

 

printend ; print endmenu(); print endpage();
CHANGES TO AFFECT THESE BARCODES
Tick ALL barcodes that changes are to apply too. Those left un-ticked will keep the original group record.
  Barcode Location Date Due Last Seen
$items[$i]->{'barcode'} $items[$i]->{'holdingbranch'} $items[$i]->{'datelastseen'}