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('biblionumber');
35 my $biblioitemnumber=$input->param('biblioitemnumber');
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 $datereceived=$input->param('datereceived');
42 my $replacement=$input->param('rrp');
43 my $gst=$input->param('gst');
44 my $freight=$input->param('freight');
45 my $supplierid = $input->param('supplierid');
46 my $branch=$input->param('branch');
48 # if ($quantrec != 0){
53 # save the quantity recieved.
54 $datereceived = ModReceiveOrder($biblionumber,$ordnum,$quantrec,$user,$cost,$invoiceno,$datereceived,$freight,$replacement);
55 # create items if the user has entered barcodes
56 my $barcode=$input->param('barcode');
57 my @barcodes=split(/\,| |\|/,$barcode);
58 my ($error) = newitems({ biblioitemnumber => $biblioitemnumber,
59 biblionumber => $biblionumber,
60 replacementprice => $replacement,
62 booksellerid => $supplierid,
63 homebranch => $branch,
66 print $input->redirect("/cgi-bin/koha/acqui/parcel.pl?invoice=$invoiceno&supplierid=$supplierid&freight=$freight&gst=$gst&datereceived=$datereceived");
69 delorder($biblionumber,$ordnum);
70 print $input->redirect("/acquisitions/");