Template for 135a field plugin
[koha.git] / acqui.simple / saveitem.pl
index 2726f09..dadf0f8 100755 (executable)
@@ -21,7 +21,7 @@
 
 use CGI;
 use strict;
-use C4::Catalogue;
+use C4::Catalogue;
 use C4::Biblio;
 
 my $input            = new CGI;
@@ -32,6 +32,7 @@ my $item             = {
     biblionumber     => $biblionumber,
     biblioitemnumber => $biblioitemnumber?$biblioitemnumber:"",
     homebranch       => $input->param('homebranch'),
+    holdingbranch       => $input->param('homebranch'),
     replacementprice => $input->param('replacementprice')?$input->param('replacementprice'):"",
     itemnotes        => $input->param('notes')?$input->param('notes'):""
 }; # my $item
@@ -43,8 +44,6 @@ my $biblioitem       = {
     publicationyear   => $input->param('publicationyear')?$input->param('publicationyear'):"",
     place             => $input->param('place')?$input->param('place'):"",
     illus             => $input->param('illus')?$input->param('illus'):"",
-    additionalauthors => $input->param('additionalauthors')?$input->param('additionalauthors'):"",
-    subjectheadings   => $input->param('subjectheadings')?$input->param('subjectheadings'):"",
     url               => $input->param('url')?$input->param('url'):"",
     dewey             => $input->param('dewey')?$input->param('dewey'):"",
     subclass          => $input->param('subclass')?$input->param('subclass'):"",
@@ -55,7 +54,7 @@ my $biblioitem       = {
     volumeddesc       => $input->param('volumeddesc')?$input->param('volumeddesc'):"",
     pages             => $input->param('pages')?$input->param('pages'):"",
     size              => $input->param('size')?$input->param('size'):"",
-    notes             => $input->param('notes')?$input->param('notes'):""
+    notes             => $input->param('itemnotes')?$input->param('itemnotes'):""
 }; # my biblioitem
 my $newgroup = 0;
 my $website  = 0;
@@ -72,15 +71,16 @@ if ($input->param('newgroup')) {
 if (! $biblionumber) {
     print $input->redirect('addbooks.pl');
 } elsif ((! $barcode) && (! $website)) {
-    print $input->redirect("additem.pl?biblionumber=$biblionumber&error=nobarcode");
+    print $input->redirect("additem-nomarc.pl?biblionumber=$biblionumber&error=nobarcode");
 } elsif ((! $newgroup) && (! $biblioitemnumber)) {
-    print $input->redirect("additem.pl?biblionumber=$biblionumber&error=nobiblioitem");
+    print $input->redirect("additem-nomarc.pl?biblionumber=$biblionumber&error=nobiblioitem");
 } else {
 
     if ($website) {
        &newbiblioitem($biblioitem);
+               print $input->redirect("additem-nomarc.pl?biblionumber=$biblionumber");
     } elsif (&checkitems(1,$barcode)) {
-       print $input->redirect("additem.pl?biblionumber=$biblionumber&error=barcodeinuse");
+       print $input->redirect("additem-nomarc.pl?biblionumber=$biblionumber&error=barcodeinuse");
     } else {
 
        if ($newgroup) {
@@ -90,6 +90,6 @@ if (! $biblionumber) {
 
        &newitems($item, ($barcode));
 
-       print $input->redirect("additem.pl?biblionumber=$biblionumber");
+       print $input->redirect("additem-nomarc.pl?biblionumber=$biblionumber");
     } # else
 } # else