#!/usr/bin/perl # $Id$ #script to recieve orders #written by chris@katipo.co.nz 24/2/2000 # Copyright 2000-2002 Katipo Communications # # This file is part of Koha. # # Koha is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # Koha is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA use strict; use CGI; use C4::Context; use C4::Catalogue; use C4::Biblio; use C4::Output; use C4::Search; my $input=new CGI; print $input->header(); my $id=$input->param('id'); print startpage; print startmenu('acquisitions'); my $search=$input->param('recieve'); my $invoice=$input->param('invoice'); my $freight=$input->param('freight'); my $biblio=$input->param('biblio'); my $catview=$input->param('catview'); my $gst=$input->param('gst'); my ($count,@results)=ordersearch($search,$biblio,$catview); my ($count2,@booksellers)=bookseller($results[0]->{'booksellerid'}); #print $count; my @date=split('-',$results[0]->{'entrydate'}); my $date="$date[2]/$date[1]/$date[0]"; if ($count == 1){ print <
{'biblionumber'}> {'ordernumber'}> {'biblioitemnumber'}> {'booksellerid'}> EOP ; if ($catview ne 'yes'){ print ""; } else { print "{'ordernumber'}&id=$results[0]->{'booksellerid'}>"; } print <$results[0]->{'ordernumber'} - Receive Order
Shopping Basket For: $booksellers[0]->{'name'}
Order placed: $date

CATALOGUE DETAILS
Title *
Author
Copyright Date
Format
ISBN
Series
Branch
Item Barcode * preference("autoBarcode") || 0; # See whether barcodes should be automatically allocated. # Defaults to 0, meaning "no". if ($auto_barcode eq '1') { my $dbh = C4::Context->dbh; my $query="Select barcode from items order by barcode desc"; my $sth=$dbh->prepare($query); $sth->execute; my $data=$sth->fetchrow_hashref; print $data->{'barcode'}+1; $sth->finish; } print <
Volume Info (for serials) *
ACCOUNTING DETAILS
Bookfund *
Quantity Ordered {'quantity'}>
Quantity Received * {'quantityreceived'}>
Replacement Cost
Budgeted Cost
Actual Cost *
Invoice Number $invoice
Notes

 

EOP ; } else { print "
"; print < EOP ; for (my $i=0;$i<$count;$i++){ print ""; } print "
ISBN TITLE AUTHOR
$results[$i]->{'isbn'} {'ordernumber'}&biblio=$results[$i]->{'biblionumber'}&invoice=$invoice&freight=$freight&gst=$gst>$results[$i]->{'title'} $results[$i]->{'author'}
"; } print endmenu('acquisitions'); print endpage;