4 # Copyright 2000-2002 Katipo Communications
6 # This file is part of Koha.
8 # Koha is free software; you can redistribute it and/or modify it under the
9 # terms of the GNU General Public License as published by the Free Software
10 # Foundation; either version 2 of the License, or (at your option) any later
13 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
14 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along with
18 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
19 # Suite 330, Boston, MA 02111-1307 USA
29 #print $input->header;
32 my $bibitemnum = checkinp($input->param('bibitemnum'));
33 my $bibnum = checkinp($input->param('bibnum'));
34 my $itemtype = checkinp($input->param('Item'));
35 my $url = checkinp($input->param('url'));
36 my $isbn = checkinp($input->param('ISBN'));
37 my $publishercode = checkinp($input->param('Publisher'));
38 my $publicationdate = checkinp($input->param('Publication'));
39 my $class = checkinp($input->param('Class'));
40 my $illus = checkinp($input->param('Illustrations'));
41 my $pages = checkinp($input->param('Pages'));
42 my $volumeddesc = checkinp($input->param('Volume'));
43 my $notes = checkinp($input->param('Notes'));
44 my $size = checkinp($input->param('Size'));
45 my $place = checkinp($input->param('Place'));
50 if ($itemtype ne 'NF') {
51 $classification=$class;
54 if ($class =~/[0-9]+/) {
57 $dewey=~ s/[a-z]+//gi;
60 @temp=split(/[0-9]+\.[0-9]+/,$class);
62 @temp=split(/[0-9]+/,$class);
64 $classification=$temp[0];
66 # print $classification,$dewey,$subclass;
72 my (@items) = &itemissues($bibitemnum);
78 my $existing=$input->param('existing');
79 if ($existing eq 'YES'){
81 my $group=$input->param('existinggroup');
82 #go thru items assing selected ones to group
83 for (my $i=0;$i<$count;$i++){
84 my $temp="check_group_".$items[$i]->{'barcode'};
85 my $barcode=$input->param($temp);
87 moditem($items[$i]->{'notforloan'},$items[$i]->{'itemnumber'},$group);
88 # print "modify $items[$i]->{'itemnumber'} $group";
95 for (my $i=0;$i<$count;$i++){
96 my $temp="check_group_".$items[$i]->{'barcode'};
97 $barcodes[$i]=$input->param($temp);
98 if ($barcodes[$i] eq ''){
105 if ($flag eq 'notall' && $flag2 eq 'leastone'){
106 $bibitemnum = &newbiblioitem({
107 biblionumber => $bibnum,
108 itemtype => $itemtype?$itemtype:"",
110 isbn => $isbn?$isbn:"",
111 publishercode => $publishercode?$publishercode:"",
112 publicationyear => $publicationdate?$publicationdate:"",
113 volumeddesc => $volumeddesc?$volumeddesc:"",
114 classification => $classification?$classification:"",
115 dewey => $dewey?$dewey:"",
116 subclass => $subclass?$subclass:"",
117 illus => $illus?$illus:"",
118 pages => $pages?$pages:"",
119 notes => $notes?$notes:"",
120 size => $size?$size:"",
121 place => $place?$place:"" });
122 if ($itemtype =~ /REF/){
127 for (my $i=0;$i<$count;$i++){
128 if ($barcodes[$i] ne ''){
129 moditem($loan,$items[$i]->{'itemnumber'},$bibitemnum);
133 } elsif ($flag2 eq 'leastone') {
135 biblioitemnumber => $bibitemnum,
136 itemtype => $itemtype?$itemtype:"",
138 isbn => $isbn?$isbn:"",
139 publishercode => $publishercode?$publishercode:"",
140 publicationyear => $publicationdate?$publicationdate:"",
141 classification => $classification?$classification:"",
142 dewey => $dewey?$dewey:"",
143 subclass => $subclass?$subclass:"",
144 illus => $illus?$illus:"",
145 pages => $pages?$pages:"",
146 volumeddesc => $volumeddesc?$volumeddesc:"",
147 notes => $notes?$notes:"",
148 size => $size?$size:"",
149 place => $place?$place:"" });
150 if ($itemtype =~ /REF/){
155 for (my $i=0;$i<$count;$i++){
156 if ($barcodes[$i] ne ''){
157 moditem($loan,$items[$i]->{'itemnumber'},$bibitemnum);
163 biblioitemnumber => $bibitemnum,
164 itemtype => $itemtype?$itemtype:"",
166 isbn => $isbn?$isbn:"",
167 publishercode => $publishercode?$publishercode:"",
168 publicationyear => $publicationdate?$publicationdate:"",
169 classification => $classification?$classification:"",
170 dewey => $dewey?$dewey:"",
171 subclass => $subclass?$subclass:"",
172 illus => $illus?$illus:"",
173 pages => $pages?$pages:"",
174 volumeddesc => $volumeddesc?$volumeddesc:"",
175 notes => $notes?$notes:"",
176 size => $size?$size:"",
177 place => $place?$place:"" });
180 print $input->redirect("moredetail.pl?type=intra&bib=$bibnum&bi=$bibitemnum");