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({ biblionumber => $bibnum,
88 notforloan => $items[$i]->{'notforloan'},
89 itemnumber => $items[$i]->{'itemnumber'},
92 # print "modify $items[$i]->{'itemnumber'} $group";
99 for (my $i=0;$i<$count;$i++){
100 my $temp="check_group_".$items[$i]->{'barcode'};
101 $barcodes[$i]=$input->param($temp);
102 if ($barcodes[$i] eq ''){
109 if ($flag eq 'notall' && $flag2 eq 'leastone'){
110 $bibitemnum = &newbiblioitem({
111 biblionumber => $bibnum,
112 itemtype => $itemtype?$itemtype:"",
114 isbn => $isbn?$isbn:"",
115 publishercode => $publishercode?$publishercode:"",
116 publicationyear => $publicationdate?$publicationdate:"",
117 volumeddesc => $volumeddesc?$volumeddesc:"",
118 classification => $classification?$classification:"",
119 dewey => $dewey?$dewey:"",
120 subclass => $subclass?$subclass:"",
121 illus => $illus?$illus:"",
122 pages => $pages?$pages:"",
123 notes => $notes?$notes:"",
124 size => $size?$size:"",
125 place => $place?$place:"" });
126 if ($itemtype =~ /REF/){
131 for (my $i=0;$i<$count;$i++){
132 if ($barcodes[$i] ne ''){
133 moditem({ biblionumber => $bibnum,
135 itemnumber => $items[$i]->{'itemnumber'},
136 bibitemnum => $bibitemnum
141 } elsif ($flag2 eq 'leastone') {
143 biblioitemnumber => $bibitemnum,
144 biblionumber => $bibnum,
145 itemtype => $itemtype?$itemtype:"",
147 isbn => $isbn?$isbn:"",
148 publishercode => $publishercode?$publishercode:"",
149 publicationyear => $publicationdate?$publicationdate:"",
150 classification => $classification?$classification:"",
151 dewey => $dewey?$dewey:"",
152 subclass => $subclass?$subclass:"",
153 illus => $illus?$illus:"",
154 pages => $pages?$pages:"",
155 volumeddesc => $volumeddesc?$volumeddesc:"",
156 notes => $notes?$notes:"",
157 size => $size?$size:"",
158 place => $place?$place:"" });
159 if ($itemtype =~ /REF/){
164 for (my $i=0;$i<$count;$i++){
165 if ($barcodes[$i] ne ''){
166 moditem( {biblionumber => $bibnum,
168 itemnumber => $items[$i]->{'itemnumber'},
169 bibitemnum => $bibitemnum
176 biblioitemnumber => $bibitemnum,
177 itemtype => $itemtype?$itemtype:"",
179 isbn => $isbn?$isbn:"",
180 publishercode => $publishercode?$publishercode:"",
181 publicationyear => $publicationdate?$publicationdate:"",
182 classification => $classification?$classification:"",
183 dewey => $dewey?$dewey:"",
184 subclass => $subclass?$subclass:"",
185 illus => $illus?$illus:"",
186 pages => $pages?$pages:"",
187 volumeddesc => $volumeddesc?$volumeddesc:"",
188 notes => $notes?$notes:"",
189 size => $size?$size:"",
190 place => $place?$place:"" });
193 print $input->redirect("moredetail.pl?type=intra&bib=$bibnum&bi=$bibitemnum");