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
27 my $barcode = $input->param('barcode');
28 my $biblionumber = $input->param('biblionumber');
29 my $biblioitemnumber = $input->param('biblioitemnumber');
31 biblionumber => $biblionumber,
32 biblioitemnumber => $biblioitemnumber?$biblioitemnumber:"",
33 homebranch => $input->param('homebranch'),
34 replacementprice => $input->param('replacementprice')?$input->param('replacementprice'):"",
35 itemnotes => $input->param('notes')?$input->param('notes'):""
38 biblionumber => $biblionumber,
39 itemtype => $input->param('itemtype'),
40 isbn => $input->param('isbn')?$input->param('isbn'):"",
41 publishercode => $input->param('publishercode')?$input->param('publishercode'):"",
42 publicationyear => $input->param('publicationyear')?$input->param('publicationyear'):"",
43 place => $input->param('place')?$input->param('place'):"",
44 illus => $input->param('illus')?$input->param('illus'):"",
45 additionalauthors => $input->param('additionalauthors')?$input->param('additionalauthors'):"",
46 subjectheadings => $input->param('subjectheadings')?$input->param('subjectheadings'):"",
47 url => $input->param('url')?$input->param('url'):"",
48 dewey => $input->param('dewey')?$input->param('dewey'):"",
49 subclass => $input->param('subclass')?$input->param('subclass'):"",
50 issn => $input->param('issn')?$input->param('issn'):"",
51 lccn => $input->param('lccn')?$input->param('lccn'):"",
52 volume => $input->param('volume')?$input->param('volume'):"",
53 number => $input->param('number')?$input->param('number'):"",
54 volumeddesc => $input->param('volumeddesc')?$input->param('volumeddesc'):"",
55 pages => $input->param('pages')?$input->param('pages'):"",
56 size => $input->param('size')?$input->param('size'):"",
57 notes => $input->param('notes')?$input->param('notes'):""
64 if ($input->param('newgroup')) {
66 if ($biblioitem->{'itemtype'} eq "WEB") {
71 if (! $biblionumber) {
72 print $input->redirect('addbooks.pl');
73 } elsif ((! $barcode) && (! $website)) {
74 print $input->redirect("additem.pl?biblionumber=$biblionumber&error=nobarcode");
75 } elsif ((! $newgroup) && (! $biblioitemnumber)) {
76 print $input->redirect("additem.pl?biblionumber=$biblionumber&error=nobiblioitem");
80 &newbiblioitem($biblioitem);
81 } elsif (&checkitems(1,$barcode)) {
82 print $input->redirect("additem.pl?biblionumber=$biblionumber&error=barcodeinuse");
86 $biblioitemnumber = &newbiblioitem($biblioitem);
87 $item->{'biblioitemnumber'} = $biblioitemnumber;
90 &newitems($item, ($barcode));
92 print $input->redirect("additem.pl?biblionumber=$biblionumber");