3 #script to add a new item and to mark orders as received
4 #written 1/3/00 by chris@katipo.co.nz
7 # Copyright 2000-2002 Katipo Communications
9 # This file is part of Koha.
11 # Koha is free software; you can redistribute it and/or modify it under the
12 # terms of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
16 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
18 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License along with
21 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
22 # Suite 330, Boston, MA 02111-1307 USA
33 my $user=$input->remote_user;
34 my $biblionumber = $input->param('biblio');
35 my $bibitemno=$input->param('biblioitemnum');
36 my $ordnum=$input->param('ordnum');
37 my $quantrec=$input->param('quantityrec');
38 my $quantity=$input->param('quantity');
39 my $cost=$input->param('cost');
40 my $invoiceno=$input->param('invoice');
41 my $replacement=$input->param('rrp');
42 my $gst=$input->param('gst');
43 my $freight=$input->param('freight');
44 my $supplierid = $input->param('supplierid');
45 my $branch=$input->param('branch');
47 # if ($quantrec != 0){
52 # save the quantity recieved.
53 receiveorder($biblionumber,$ordnum,$quantrec,$user,$cost,$invoiceno,$freight,$replacement);
54 # create items if the user has entered barcodes
55 my $barcode=$input->param('barcode');
56 my @barcodes=split(/\,| |\|/,$barcode);
57 my ($error) = newitems({ biblioitemnumber => $bibitemno,
58 biblionumber => $biblionumber,
59 replacementprice => $replacement,
61 booksellerid => $supplierid,
62 homebranch => $branch,
65 print $input->redirect("/cgi-bin/koha/acqui/receive.pl?invoice=$invoiceno&supplierid=$supplierid&freight=$freight&gst=$gst");
68 delorder($biblionumber,$ordnum);
69 print $input->redirect("/acquisitions/");