From: arensb Date: Sun, 13 Oct 2002 07:31:21 +0000 (+0000) Subject: Added magic RCS comment. X-Git-Tag: R_1-3-1~24 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=7197a3735b36b22261776f93f3aa2407dcf55ba6;p=koha_gimpoz Added magic RCS comment. Removed trailing whitespace. --- diff --git a/C4/Circmain.pm b/C4/Circmain.pm index 13e708b860..27166993cf 100755 --- a/C4/Circmain.pm +++ b/C4/Circmain.pm @@ -1,6 +1,8 @@ -package C4::Circmain; #assumes C4/Circulation +package C4::Circmain; -#package to deal with circulation +# $Id$ + +#package to deal with circulation # Copyright 2000-2002 Katipo Communications @@ -36,10 +38,10 @@ use C4::InterfaceCDK; use C4::Security; use vars qw($VERSION @ISA @EXPORT); - + # set the version for version checking $VERSION = 0.01; - + @ISA = qw(Exporter); @EXPORT = qw(&Start_circ); @@ -55,32 +57,29 @@ sub Start_circ{ my $data; while ($donext ne 'Quit') { if ($donext eq "Circ") { - #($reason,$data) = menu($env,'console','Circulation', + #($reason,$data) = menu($env,'console','Circulation', # ('Issues','Returns','Borrower Enquiries','Reserves','Log In')); #&startint($env,"Menu"); ($reason,$data) = menu($env,'console','Circulation', - ('Issues','Returns','Select Branch','Select Printer')); + ('Issues','Returns','Select Branch','Select Printer')); } else { $data = $donext; } - if ($data eq 'Issues') { - $donext=Issue($env); #C4::Circulation::Issues + if ($data eq 'Issues') { + $donext=Issue($env); #C4::Circulation::Issues } elsif ($data eq 'Returns') { - $donext=Returns($env); #C4::Circulation::Returns + $donext=Returns($env); #C4::Circulation::Returns } elsif ($data eq 'Select Branch') { getbranch($env); } elsif ($data eq 'Select Printer') { - getprinter($env); + getprinter($env); } elsif ($data eq 'Borrower Enquiries') { # $donext=Borenq($env); #C4::Circulation::Borrower - conversion } elsif ($data eq 'Reserves'){ - $donext=EnterReserves($env); #C4::Reserves - } elsif ($data eq 'Quit') { + $donext=EnterReserves($env); #C4::Reserves + } elsif ($data eq 'Quit') { $donext = $data; } } - &endint($env) + &endint($env) } - - -END { } # module clean-up code here (global destructor) diff --git a/C4/Database.pm b/C4/Database.pm index 5fe47c12b5..dfa3c0c916 100755 --- a/C4/Database.pm +++ b/C4/Database.pm @@ -1,5 +1,7 @@ package C4::Database; +# $Id$ + # Copyright 2000-2002 Katipo Communications # # This file is part of Koha. @@ -21,9 +23,9 @@ use strict; require Exporter; use DBI; use vars qw($VERSION @ISA @EXPORT); - + $VERSION = 0.01; - + @ISA = qw(Exporter); @EXPORT = qw( ); diff --git a/C4/Groups.pm b/C4/Groups.pm index 24bdf84f78..d76ea77b5c 100755 --- a/C4/Groups.pm +++ b/C4/Groups.pm @@ -1,5 +1,7 @@ package C4::Groups; +# $Id$ + #package to deal with Returns #written 3/11/99 by olwen@katipo.co.nz @@ -39,10 +41,10 @@ use C4::Stats; #use C4::Print; use vars qw($VERSION @ISA @EXPORT); - + # set the version for version checking $VERSION = 0.01; - + @ISA = qw(Exporter); @EXPORT = qw(&getgroups &groupmembers); diff --git a/C4/Security.pm b/C4/Security.pm index b0614df244..47d306f5ab 100644 --- a/C4/Security.pm +++ b/C4/Security.pm @@ -1,5 +1,6 @@ -package C4::Security; #assumes C4/Security +package C4::Security; +# $Id$ # Copyright 2000-2002 Katipo Communications # @@ -43,7 +44,7 @@ sub Login { my $sth=$dbh->prepare($query); $sth->execute; while (my $branchrec=$sth->fetchrow_hashref) { - my $branchdet = + my $branchdet = fmtstr($env,$branchrec->{'branchcode'},"L2")." ".$branchrec->{'branchname'}; push @branches,$branchdet; } @@ -67,7 +68,7 @@ sub Login { $env->{'usercode'} = $username; $env->{'branchcode'} = $branch; } - + } else { debug_msg("","not found"); } @@ -76,10 +77,7 @@ sub Login { } &endint(); } - + sub CheckAccess { my ($env)=@_; } - -END { } # module clean-up code here (global destructor) - diff --git a/acqui.simple/addbiblio.pl b/acqui.simple/addbiblio.pl index 64fa0e6aec..1f980327f8 100755 --- a/acqui.simple/addbiblio.pl +++ b/acqui.simple/addbiblio.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + # # TODO # @@ -38,7 +40,7 @@ print startmenu('acquisitions'); print << "EOF"; Adding a new Biblio
- + diff --git a/acqui.simple/addbooks.pl b/acqui.simple/addbooks.pl index e29d9e9570..f212496a6a 100755 --- a/acqui.simple/addbooks.pl +++ b/acqui.simple/addbooks.pl @@ -1,10 +1,12 @@ #!/usr/bin/perl +# $Id$ + # # Modified saas@users.sf.net 12:00 01 April 2001 # The biblioitemnumber was not correctly initialised # The max(barcode) value was broken - koha 'barcode' is a string value! -# - If left blank, barcode value now defaults to max(biblionumber) +# - If left blank, barcode value now defaults to max(biblionumber) # # TODO @@ -126,14 +128,14 @@ EOF -
Section One: Copyright Information
Help
+ Koha stores data in three sections

Biblio

The first section records bibliographic data such as title, author and copyright for a particular work.

-

Group

-The second records bibliographic data for a particular publication of that work, such as ISBN number, physical description, publisher information, etc +

Group

+The second records bibliographic data for a particular publication of that work, such as ISBN number, physical description, publisher information, etc

Item

The third section holds specific item information, such as the bar code number diff --git a/acqui.simple/addbookslccn.pl b/acqui.simple/addbookslccn.pl index 193c3578d9..5ebb8b7404 100755 --- a/acqui.simple/addbookslccn.pl +++ b/acqui.simple/addbookslccn.pl @@ -1,10 +1,12 @@ #!/usr/bin/perl +# $Id$ + # # Modified saas@users.sf.net 12:00 01 April 2001 # The biblioitemnumber was not correctly initialised # The max(barcode) value was broken - koha 'barcode' is a string value! -# - If left blank, barcode value now defaults to max(biblionumber) +# - If left blank, barcode value now defaults to max(biblionumber) # # TODO @@ -345,13 +347,13 @@ EOF - - diff --git a/acqui.simple/additem.pl b/acqui.simple/additem.pl index c8da4cfe79..9bffa2d959 100755 --- a/acqui.simple/additem.pl +++ b/acqui.simple/additem.pl @@ -1,5 +1,6 @@ #!/usr/bin/perl +# $Id$ # Copyright 2000-2002 Katipo Communications # @@ -55,11 +56,11 @@ if (! $biblionumber) { ($biblioitemcount, @biblioitems) = &getbiblioitembybiblionumber($biblionumber); ($branchcount, @branches) = &branches; ($itemtypecount, @itemtypes) = &getitemtypes; - + for (my $i = 0; $i < $itemtypecount; $i++) { $itemtypedescriptions{$itemtypes[$i]->{'itemtype'}} = $itemtypes[$i]->{'description'}; } # for - + for (my $i = 0; $i < $branchcount; $i++) { $branchnames{$branches[$i]->{'branchcode'}} = $branches[$i]->{'branchname'}; } # for @@ -104,7 +105,7 @@ EOF for (my $i = 0; $i < $biblioitemcount; $i++) { if ($biblioitems[$i]->{'itemtype'} eq "WEB") { - + print << "EOF"; diff --git a/acqui.simple/marcimport.pl b/acqui.simple/marcimport.pl index 6c43845a47..d8f3e476b7 100755 --- a/acqui.simple/marcimport.pl +++ b/acqui.simple/marcimport.pl @@ -84,7 +84,7 @@ my $menu = $input->param('menu'); # if ($input->param('z3950queue')) { AcceptZ3950Queue($dbh,$input); -} +} if ($input->param('uploadmarc')) { AcceptMarcUpload($dbh,$input) @@ -157,7 +157,7 @@ sub ProcessRecord { $record, $data, ); - + if ($file=~/Z-(\d+)/) { my $id=$1; my $resultsid=$input->param('resultsid'); @@ -169,7 +169,7 @@ sub ProcessRecord { $sth->execute; ($data) = $sth->fetchrow; } - + my $file=MARC::File::USMARC->indata ($data); my $oldkoha; # FIXME - This "==" should be "=", right? @@ -216,7 +216,7 @@ sub ProcessRecord { $template->param(numrecord => $numrecord); $template->param(file => $data); print "Content-Type: text/html\n\n", $template->output; -} +} # lists all records from the MARC file sub ListFileRecords { @@ -243,13 +243,13 @@ sub ListFileRecords { my $record; my ($numrecords,$resultsid,$data,$startdate,$enddate); # FIXME - there's already a $data a few lines above. - + $dbh = C4::Context->dbh; my $template=gettemplate('marcimport/ListFileRecords.tmpl'); # File can be z3950 search query or uploaded MARC data - + # if z3950 results if (not $file=~/Z-(\d+)/) { # This is a Marc upload @@ -261,19 +261,19 @@ sub ListFileRecords { } if ($file=~/Z-(\d+)/) { - # This is a z3950 search + # This is a z3950 search $template->param(IS_Z3950 =>1); my $id=$1; # search query id number my $serverstring; my $starttimer=time(); - + $sth=$dbh->prepare(" select z3950results.numrecords,z3950results.id,z3950results.results, - z3950results.startdate,z3950results.enddate,server - from z3950queue left outer join z3950results - on z3950queue.id=z3950results.queryid + z3950results.startdate,z3950results.enddate,server + from z3950queue left outer join z3950results + on z3950queue.id=z3950results.queryid where z3950queue.id=? - order by server + order by server "); $sth->execute($id); if ( $sth->rows ) { @@ -314,7 +314,7 @@ sub ListFileRecords { $template->param(numrecords => $numrecords); $template->param(previous => $previous); $template->param(next => $next); - my $stj=$dbh->prepare("update z3950results + my $stj=$dbh->prepare("update z3950results set highestseen=? where id=?"); $stj->execute($startrecord+10,$resultsid); } @@ -353,7 +353,7 @@ sub ListFileRecords { } else { # -# This is an uploaded Marc record +# This is an uploaded Marc record # my @loop = (); my $MARCfile = MARC::File::USMARC->indata($data); @@ -388,8 +388,8 @@ sub ResultRecordLink { # $bib=extractmarcfields($record); - $sth=$dbh->prepare("select * - from biblioitems + $sth=$dbh->prepare("select * + from biblioitems where (isbn=? and isbn!='') or (issn=? and issn!='') or (lccn=? and lccn!='') "); $sth->execute($oldkoha->{isbn},$oldkoha->{issn},$oldkoha->{lccn}); if ($sth->rows) { @@ -398,7 +398,7 @@ sub ResultRecordLink { $donetext=""; } ($oldkoha->{author}) && ($oldkoha->{author}="by $oldkoha->{author}"); - + $searchfield=""; foreach $fieldname ( "controlnumber", "lccn", "issn", "isbn") { if ( defined $oldkoha->{$fieldname} && $oldkoha->{$fieldname} ) { @@ -439,7 +439,7 @@ sub z3950menu { $elapsed, $elapsedtime, $resultstatus, $statuscolor, - $id, $term, $type, $done, + $id, $term, $type, $done, $startdate, $enddate, $servers, $record,$bib,$title, ); @@ -464,12 +464,12 @@ EOT # Check queued queries $sth=$dbh->prepare("select id,term,type,done, - startdate,enddate,servers - from z3950queue - order by id desc + startdate,enddate,servers + from z3950queue + order by id desc limit 20 "); $sth->execute; - while ( ($id, $term, $type, $done, + while ( ($id, $term, $type, $done, $startdate, $enddate, $servers) = $sth->fetchrow) { $type=uc($type); $term=~s/prepare("select id,server,startdate,enddate,numrecords,results - from z3950results + from z3950results where queryid=?"); $sti->execute($id); if ($sti->rows) { $processing=0; $realenddate=0; $totalrecords=0; - while (my ($r_id,$r_server,$r_startdate,$r_enddate,$r_numrecords,$r_marcdata) + while (my ($r_id,$r_server,$r_startdate,$r_enddate,$r_numrecords,$r_marcdata) = $sti->fetchrow) { if ($r_enddate==0) { # It hasn't finished yet @@ -542,8 +542,8 @@ EOT # Search input form print " @@ -652,7 +652,7 @@ sub AcceptZ3950Queue { } } - $error=addz3950queue($dbh,$input->param('query'), $input->param('type'), + $error=addz3950queue($dbh,$input->param('query'), $input->param('type'), $input->param('rand'), @serverlist); if ( $error ) { print qq| @@ -669,7 +669,7 @@ script should be run as root, and it will start up the program running with the< privileges of your apache user. Ideally, this script should be started from a
system init directory so that is running after the machine starts up. |; - + } # if daemon print qq| @@ -708,8 +708,8 @@ sub AcceptMarcUpload { } my $q_marcrecord=$dbh->quote($marcrecord); my $q_name=$dbh->quote($name); - my $sth=$dbh->prepare("insert into uploadedmarc - (marc,name) + my $sth=$dbh->prepare("insert into uploadedmarc + (marc,name) values ($q_marcrecord, $q_name)"); $sth->execute; } # sub AcceptMarcUpload @@ -757,8 +757,8 @@ sub AcceptBiblioitem { my $oldkoha = MARCmarc2koha($dbh,$record); # See if it already exists # FIXME - There's already a $sth in this context. - my $sth=$dbh->prepare("select biblionumber,biblioitemnumber - from biblioitems + my $sth=$dbh->prepare("select biblionumber,biblioitemnumber + from biblioitems where isbn=? or issn=? or lccn=?"); $sth->execute($oldkoha->{isbn},$oldkoha->{issn},$oldkoha->{lccn}); if ($sth->rows) { @@ -776,14 +776,14 @@ sub AcceptBiblioitem { my $error; my %biblio; my %biblioitem; - + # convert to upper case and split on lines my $subjectheadings=$input->param('subject'); my @subjectheadings=split(/[\r\n]+/,$subjectheadings); - + my $additionalauthors=$input->param('additionalauthors'); my @additionalauthors=split(/[\r\n]+|\|/,uc($additionalauthors)); - + # Use individual assignments to hash buckets, in case # any of the input parameters are empty or don't exist $biblio{title} =$input->param('title'); @@ -793,7 +793,7 @@ sub AcceptBiblioitem { $biblio{notes} =$input->param('notes'); $biblio{abstract} =$input->param('abstract'); $biblio{subtitle} =$input->param('subtitle'); - + $biblioitem{volume} =$input->param('volume'); $biblioitem{number} =$input->param('number'); $biblioitem{itemtype} =$input->param('itemtype'); @@ -823,10 +823,10 @@ sub AcceptBiblioitem { # \@subjectheadings, # \@additionalauthors # ); - + if ( $error ) { print "

Error adding biblio item

$error\n"; - } else { + } else { $template->param(title => $title); $template->param(biblionumber => $biblionumber); $template->param(biblioitemnumber => $biblioitemnumber); @@ -867,8 +867,8 @@ sub AcceptItemCopy { my $barcode=$input->param('barcode'); my $replacementprice=($input->param('replacementprice') || 0); - my $sth=$dbh->prepare("select barcode - from items + my $sth=$dbh->prepare("select barcode + from items where barcode=?"); $sth->execute($barcode); if ($sth->rows) { @@ -998,6 +998,10 @@ sub FormatMarcText { #--------------- # $Log$ +# Revision 1.17 2002/10/13 07:39:26 arensb +# Added magic RCS comment. +# Removed trailing whitespace. +# # Revision 1.16 2002/10/11 12:45:10 arensb # Replaced &requireDBI with C4::Context->dbh, thus making the "use # Fixed muffed quotes in &gettemplate calls. diff --git a/acqui.simple/processz3950queue b/acqui.simple/processz3950queue index 20e899b41a..bb64540e6a 100755 --- a/acqui.simple/processz3950queue +++ b/acqui.simple/processz3950queue @@ -1,4 +1,7 @@ #!/usr/bin/perl + +# $Id$ + use C4::Context; use DBI; #use strict; @@ -9,22 +12,22 @@ use Net::Z3950; if ($< == 0) { - # Running as root, switch privs + # Running as root, switch privs if (-d "/var/run") { open PID, ">/var/run/processz3950queue.pid"; print PID $$."\n"; close PID; } # Get real apacheuser from koha.conf or reparsing httpd.conf - my $apacheuser='www-data'; + my $apacheuser='www-data'; my $uid=0; - unless ($uid = (getpwnam($apacheuser))[2]) { + unless ($uid = (getpwnam($apacheuser))[2]) { die "Attempt to run daemon as non-existent or superuser\n"; } $>=$uid; $<=$uid; } - + my $dbh = C4::Context->dbh; diff --git a/acqui.simple/saveitem.pl b/acqui.simple/saveitem.pl index 491cb97d73..2726f09fac 100755 --- a/acqui.simple/saveitem.pl +++ b/acqui.simple/saveitem.pl @@ -1,5 +1,6 @@ #!/usr/bin/perl +# $Id$ # Copyright 2000-2002 Katipo Communications # @@ -75,7 +76,7 @@ if (! $biblionumber) { } elsif ((! $newgroup) && (! $biblioitemnumber)) { print $input->redirect("additem.pl?biblionumber=$biblionumber&error=nobiblioitem"); } else { - + if ($website) { &newbiblioitem($biblioitem); } elsif (&checkitems(1,$barcode)) { diff --git a/acqui/acquire.pl b/acqui/acquire.pl index 53cc6c6c0c..969f49719f 100755 --- a/acqui/acquire.pl +++ b/acqui/acquire.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to recieve orders #written by chris@katipo.co.nz 24/2/2000 @@ -44,7 +46,7 @@ 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'}); +my ($count2,@booksellers)=bookseller($results[0]->{'booksellerid'}); #print $count; my @date=split('-',$results[0]->{'entrydate'}); my $date="$date[2]/$date[1]/$date[0]"; @@ -151,14 +153,14 @@ print <
BARCODE + +
BARCODE Home Branch:
$biblioitems[$i]->{'biblioitemnumber'} GROUP - $itemtypedescriptions{$biblioitems[$i]->{'itemtype'}}\n"; - my $sth=$dbh->prepare("select id,name,checked - from z3950servers + my $sth=$dbh->prepare("select id,name,checked + from z3950servers order by rank"); # FIXME - There's already a $sth in this function. $sth->execute; @@ -553,7 +553,7 @@ EOT $serverlist.=" $name
\n"; } $serverlist.=" \n"; - + my $rand=rand(1000000000); print << "EOF";
@@ -566,10 +566,10 @@ print << "EOF";
Search for MARC records
Query Term
-  ISBN +  ISBN  LCCN
-  Author -  Title +  Author +  Title  Keyword
$serverlist
-
+

 

EOP @@ -277,11 +279,11 @@ EOP } else { print "
"; print < + - - - + + + EOP ; diff --git a/acqui/basket.pl b/acqui/basket.pl index 03b9b9f681..d5502f7753 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to show display basket of orders #written by chris@katipo.co.nz 24/2/2000 @@ -49,7 +51,7 @@ Our Reference: $basket
Authorised By: $results[0]->{'authorisedby'}
$results[0]->{'entrydate'}; -Shopping Basket For: {'booksellerid'}> $booksellers[0]->{'name'} +Shopping Basket For: {'booksellerid'}> $booksellers[0]->{'name'}{'booksellerid'}&basket=$basket>Add more orders
@@ -87,7 +89,7 @@ $sub_total+=$line_total; $gist=sprintf("%.2f",$sub_total*0.125); $grand_total=$sub_total+$gist; -print <
@@ -98,12 +100,12 @@ print <{'quantity'} onchange='update(this.form)'> {'ordernumber'}> - {'biblionumber'}> + {'biblionumber'}> EOP ; } -# +# print ""; print <HELP
To cancel an order, just change the quantity to 0 and click "save changes".
To change any of the catalogue or accounting information attached to an order, click on the title.
- To add new orders to this supplier, start with a search. + To add new orders to this supplier, start with a search.
@@ -128,7 +130,7 @@ print <
ISBNTITLEAUTHORISBNTITLEAUTHOR
$results[$i]->{'ordernumber'} $results[$i]->{'isbn'}\$
SubTotal \$
-
+ EOP ; diff --git a/acqui/newbasket.pl b/acqui/newbasket.pl index f6705c667c..f4ccdda9a0 100755 --- a/acqui/newbasket.pl +++ b/acqui/newbasket.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to show display basket of orders #written by chris@katipo.co.nz 24/2/2000 @@ -52,7 +54,7 @@ $date Shopping Basket For: {'id'}> $booksellers[0]->{'name'}
Ph: $booksellers[0]->{'phone'}, Fax: $booksellers[0]->{'fax'}, -$booksellers[0]->{'address1'}, $booksellers[0]->{'address2'}, +$booksellers[0]->{'address1'}, $booksellers[0]->{'address2'}, $booksellers[0]->{'address3'}, $booksellers[0]->{'address4'} @@ -60,7 +62,7 @@ $booksellers[0]->{'address3'}, $booksellers[0]->{'address4'} - Search Keyword or Title: + Search Keyword or Title: diff --git a/acqui/order.pl b/acqui/order.pl index 2fbfcccd84..67669661c3 100755 --- a/acqui/order.pl +++ b/acqui/order.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to show suppliers and orders #written by chris@katipo.co.nz 23/2/2000 @@ -64,7 +66,7 @@ for (my $i=0; $i<$count; $i++) { if ($orders->[0]->{'basketno'}>0) { print < - New Basket + New Basket Receive Order $suppliers[$i]->{'name'} HLT-$orders->[0]->{'basketno'} @@ -76,7 +78,7 @@ printend } else { print < - New Basket + New Basket Receive Order $suppliers[$i]->{'name'}   @@ -95,7 +97,7 @@ printend HLT-$orders->[$i2]->{'basketno'} $orders->[$i2]->{'count(*)'}$orders->[$i2]->{'authorisedby'}   $orders->[$i2]->{'entrydate'} - + printend ; } else { @@ -106,7 +108,7 @@ printend   $orders->[$i2]->{'count(*)'}$orders->[$i2]->{'authorisedby'}   $orders->[$i2]->{'entrydate'} - + printend ; } diff --git a/acqui/receive.pl b/acqui/receive.pl index bbda54f3fa..3b339099b1 100755 --- a/acqui/receive.pl +++ b/acqui/receive.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to recieve orders #written by chris@katipo.co.nz 24/2/2000 @@ -132,7 +134,7 @@ print < The total at the bottom of the page should be within a few cents of the total for the invoice.

When you have finished this invoice save the changes. - + GST \$$gst diff --git a/acqui/recieveorder.pl b/acqui/recieveorder.pl index e7ae3b0d04..1351ecbdc7 100755 --- a/acqui/recieveorder.pl +++ b/acqui/recieveorder.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to show display basket of orders #written by chris@katipo.co.nz 24/2/2000 @@ -30,7 +32,7 @@ use strict; my $input=new CGI; print $input->header(); my $id=$input->param('id'); -my ($count,@booksellers)=bookseller($id); +my ($count,@booksellers)=bookseller($id); print startpage; print startmenu('acquisitions'); @@ -47,7 +49,7 @@ print <SUPPLIER INVOICE INFORMATION Supplier Invoice Number - + diff --git a/acqui/supplier.pl b/acqui/supplier.pl index 2262adc320..cb3ff66425 100755 --- a/acqui/supplier.pl +++ b/acqui/supplier.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to show display basket of orders #written by chris@katipo.co.nz 24/2/2000 @@ -30,7 +32,7 @@ use strict; my $input=new CGI; print $input->header(); my $id=$input->param('id'); -my ($count,@booksellers)=bookseller($id); +my ($count,@booksellers)=bookseller($id); print startpage; print startmenu('acquisitions'); @@ -210,7 +212,7 @@ EOP if ($booksellers[0]->{'gstreg'}==1){ print " checked"; } -print ">Yes +print ">Yes {'gstreg'}==0){ print " checked"; @@ -227,7 +229,7 @@ EOP if ($booksellers[0]->{'listincgst'}==1){ print " checked"; } -print ">Yes +print ">Yes {'listincgst'}==0){ print " checked"; @@ -244,7 +246,7 @@ EOP if ($booksellers[0]->{'invoiceincgst'}==1){ print " checked"; } -print ">Yes +print ">Yes {'invoiceincgst'}==0){ print " checked"; @@ -253,7 +255,7 @@ print <No - + Discount {'discount'}> % diff --git a/bookcount.pl b/bookcount.pl index ccb47d7a6a..cc563a0885 100755 --- a/bookcount.pl +++ b/bookcount.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #written 7/3/2002 by Finlay #script to display reports @@ -58,7 +60,7 @@ if (not $lastmove) { } -# make the page ... +# make the page ... print $input->header; @@ -133,7 +135,7 @@ sub lastmove { $sth->execute; my ($date) = $sth->fetchrow_array; return(0, "Item has no branch transfers record") if not $date; - my $var2 = $dbh->quote($date); + my $var2 = $dbh->quote($date); $sth=$dbh->prepare("Select * from branchtransfers where branchtransfers.itemnumber=$var1 and branchtransfers.datearrived=$var2"); $sth->execute; my ($data) = $sth->fetchrow_hashref; diff --git a/boraccount.pl b/boraccount.pl index 704f41200a..e1ec28e8c6 100755 --- a/boraccount.pl +++ b/boraccount.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #writen 11/1/2000 by chris@katipo.oc.nz #script to display borrowers account details @@ -39,8 +41,8 @@ my $data=borrdata('',$bornum); #get account details my %bor; -$bor{'borrowernumber'}=$bornum; -my ($numaccts,$accts,$total)=getboracctrecord('',\%bor); +$bor{'borrowernumber'}=$bornum; +my ($numaccts,$accts,$total)=getboracctrecord('',\%bor); my @accountrows; # this is for the tmpl-loop @@ -66,6 +68,6 @@ $template->param( startmenumember => startmenu('member'), surname => $data->{'surname'}, bornum => $bornum, total => $total, - accounts => \@accountrows ); + accounts => \@accountrows ); -print "Content-Type: text/html\n\n", $template->output; \ No newline at end of file +print "Content-Type: text/html\n\n", $template->output; diff --git a/currency.pl b/currency.pl index fabc1fe043..1ff2f65945 100755 --- a/currency.pl +++ b/currency.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #written by chris@katipo.co.nz #9/10/2000 #script to display and update currency rates @@ -40,7 +42,7 @@ if ($type ne 'change'){ EXCHANGE RATES - + printend ; @@ -52,12 +54,12 @@ printend # print $rates->[$i]->{'currency'}; } print < +

- - - - + + + + printend ; } else { diff --git a/deletemem.pl b/deletemem.pl index f2260ca4bc..ae60e867aa 100755 --- a/deletemem.pl +++ b/deletemem.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to delete items #written 2/5/00 #by chris@katipo.co.nz @@ -50,9 +52,9 @@ my $sth=$dbh->prepare($query); $sth->execute; my $data=$sth->fetchrow_hashref; $sth->finish; - -if ($i > 0 || $flags->{'CHARGES'} ne '' || $data ne ''){ + +if ($i > 0 || $flags->{'CHARGES'} ne '' || $data ne ''){ print $input->header; print ""; if ($i > 0){ diff --git a/groups.pl b/groups.pl index 3a7dc63518..ab0657c6b1 100755 --- a/groups.pl +++ b/groups.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #written 14/1/2000 #script to display reports @@ -132,7 +134,7 @@ EOF

-Printer: +Printer: diff --git a/installer-lite.pl b/installer-lite.pl index a8e0bef0d8..63c0923408 100644 --- a/installer-lite.pl +++ b/installer-lite.pl @@ -1,5 +1,6 @@ #!/usr/bin/perl -w # please develop with -w +# $Id$ # Copyright 2000-2002 Katipo Communications # @@ -28,16 +29,16 @@ print qq| ******************************************* This installer will guide you through the process of installing Koha. -It is not a completely automated installation, but a guide for further +It is not a completely automated installation, but a guide for further information please read the documentation or visit the Koha website at http://www.koha.org To successfully use Koha you need some additional software: * A webserver (It was built to work with Apache, but there is no reason -it should not work with any other webserver). - -* Mysql (You could intead use postgres, or another sql based database) +it should not work with any other webserver). + +* Mysql (You could intead use postgres, or another sql based database) * Perl @@ -98,10 +99,10 @@ print "\n"; # print qq| Koha uses a small configuration file that is usually placed in your -/etc/ files directory (note: if you wish to place the koha.conf in +/etc/ files directory (note: if you wish to place the koha.conf in another location you will need to manually edit additional files). -We will help you to now create your koha.conf file, once this file +We will help you to now create your koha.conf file, once this file has been created, please copy it to your destination folder (note: this may need to be done by your systems administrator). |; @@ -115,7 +116,7 @@ my $inc_path; print "\n"; print "\n"; print qq| -Please provide the name of the mysql database that you wish to use +Please provide the name of the mysql database that you wish to use for koha. This is normally "Koha". |; @@ -129,7 +130,7 @@ do { print "\n"; print "\n"; print qq| -Please provide the hostname for mysql. Unless the database is located +Please provide the hostname for mysql. Unless the database is located on another machine this is likely to be "localhost". |; @@ -143,7 +144,7 @@ do { print "\n"; print "\n"; print qq| -Please provide the name of the mysql user, who will have full administrative +Please provide the name of the mysql user, who will have full administrative rights to the $dbname database, when authenicating from $hostname. It is recommended that you do not use your "root" user. |; @@ -182,7 +183,7 @@ do { #Create the configuration file -open(SITES,">koha.conf") or die "Couldn't create file. +open(SITES,">koha.conf") or die "Couldn't create file. Must have write capability.\n"; print SITES <>koha-apache.conf") or die "Couldn't write to file. +open(SITES,">>koha-apache.conf") or die "Couldn't write to file. Must have write capability.\n"; print SITES <>koha-apache.conf") or die "Couldn't write to file. +open(SITES,">>koha-apache.conf") or die "Couldn't write to file. Must have write capability.\n"; print SITES <; @@ -121,7 +123,7 @@ my @missing = (); unless (eval {require DBI}) { push @missing,"DBI" }; unless (eval {require Date::Manip}) { push @missing,"Date::Manip" }; unless (eval {require DBD::mysql}) { push @missing,"DBD::mysql" }; -unless (eval {require Net::Z3950}) { +unless (eval {require Net::Z3950}) { print qq| The Net::Z3950 module is missing. This module is necessary if you want to use @@ -154,7 +156,7 @@ if (@missing > 0) { my $backupdir='/usr/local/koha/backups'; -print "Please specify a backup directory [$backupdir]: "; +print "Please specify a backup directory [$backupdir]: "; $answer = ; chomp $answer; @@ -285,7 +287,7 @@ if (!$opacdir || !$intranetdir) { $intranetdir=''; $opacdir=''; while (!$intranetdir) { - print "Please specify the location of your INTRANET files: "; + print "Please specify the location of your INTRANET files: "; $answer = ; chomp $answer; @@ -299,7 +301,7 @@ if (!$opacdir || !$intranetdir) { } } while (!$opacdir) { - print "Please specify the location of your OPAC files: "; + print "Please specify the location of your OPAC files: "; $answer = ; chomp $answer; @@ -440,7 +442,7 @@ unless ($kohalogdir && -e $kohalogdir) { } unless (-e "$kohalogdir") { - my $result = mkdir 0770, "$kohalogdir"; + my $result = mkdir 0770, "$kohalogdir"; if ($result==0) { my @dirs = split(m#/#, $kohalogdir); my $checkdir=''; diff --git a/member.pl b/member.pl index f042763048..6a84456e26 100755 --- a/member.pl +++ b/member.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to do a borrower enquiery/brin up borrower details etc #written 20/12/99 by chris@katipo.co.nz @@ -33,7 +35,7 @@ my $theme = $input->param('theme') || "default"; # only used if allowthemeoverride is set my %tmpldata = pathtotemplate ( template => 'member.tmpl', theme => $theme, language => 'fi' ); # FIXME - Error-checking -my $template = HTML::Template->new( filename => $tmpldata{'path'}, +my $template = HTML::Template->new( filename => $tmpldata{'path'}, die_on_bad_params => 0, loop_context_vars => 1 ); @@ -66,5 +68,5 @@ $template->param( startmenumember => join ('', startmenu('member')), endmenumember => join ('', endmenu('member')), member => $member, resultsloop => \@resultsdata ); - + print "Content-Type: text/html\n\n", $template->output; diff --git a/memberentry.pl b/memberentry.pl index 39321ac765..ec95459701 100755 --- a/memberentry.pl +++ b/memberentry.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to set up screen for modification of borrower details #written 20/12/99 by chris@katipo.co.nz @@ -40,7 +42,7 @@ if ($member eq ''){ $member=NewBorrowerNumber(); } my $type=$input->param('type') || ''; -my $modify=$input->param('modify.x'); +my $modify=$input->param('modify.x'); my $delete=$input->param('delete.x'); if ($delete){ print $input->redirect("/cgi-bin/koha/deletemem.pl?member=$member"); @@ -51,15 +53,15 @@ if ($delete){ } else { $template->param( header => 'Add New Member'); } - + my $data=borrdata('',$member); - + if ($type eq 'Add'){ $template->param( updtype => 'I'); } else { $template->param( updtype => 'M'); } - + my $cardnumber=$data->{'cardnumber'}; my $autonumber_members = C4::Context->preference("autoMemberNum") || 0; # Find out whether member numbers should be generated @@ -88,7 +90,7 @@ if ($delete){ } else { $cardnumber = $cardnumber + 1; # FIXME - $cardnumber++; } - + while ($i <8) { # step from char 1 to 7. my $temp1 = $weightings[$i]; # read weightings, left to right, 1 char at a time my $temp2 = substr($cardnumber,$i,1); # sequence left to right, 1 char at a time @@ -100,16 +102,16 @@ if ($delete){ my $rem = ($sum%11); # remainder of sum/11 (eg. 9999999/11, remainder=2) if ($rem == 10) { # if remainder is 10, use X instead $rem = "X"; - } + } $cardnumber="V$cardnumber$rem"; } else { $cardnumber=$data->{'cardnumber'}; } - + if ($data->{'sex'} eq 'F'){ $template->param(female => 1); - } - + } + my @titles = ('Miss', 'Mrs', 'Ms', 'Mr', 'Dr', 'Sir'); # FIXME - Assumes English. This ought to be made part of i18n. my @titledata; @@ -124,7 +126,7 @@ if ($delete){ } push(@titledata, \%row); } - + my ($categories,$labels)=ethnicitycategories(); my $ethnicitycategoriescount=$#{$categories}; my $ethcatpopup; @@ -135,13 +137,13 @@ if ($delete){ -labels=>$labels); $template->param(ethcatpopup => $ethcatpopup); # bad style, has to be fixed } - + ($categories,$labels)=borrowercategories(); my $catcodepopup = CGI::popup_menu(-name=>'categorycode', -values=>$categories, -default=>$data->{'categorycode'}, -labels=>$labels); - + my @areas = ('L','F','S','H','K','O','X','Z','V'); my %arealabels = ('L' => 'Levin', 'F' => 'Foxton', @@ -152,7 +154,7 @@ if ($delete){ 'X' => 'Temporary Visitor', 'Z' => 'Interloan Libraries', 'V' => 'Village'); - + my @areadata; while (@areas) { my %row; @@ -166,8 +168,8 @@ if ($delete){ $row{'area'}=$arealabels{$shortcut}; push(@areadata, \%row); } - - + + my @relationships = ('workplace', 'relative','friend', 'neighbour'); my @relshipdata; while (@relationships) { @@ -180,12 +182,12 @@ if ($delete){ } push(@relshipdata, \%row); } - + # %flags: keys=$data-keys, datas=[formname, HTML-explanation] my %flags = ('gonenoaddress' => ['gna', 'Gone no address'], 'lost' => ['lost', 'Lost'], 'debarred' => ['debarred', 'Debarred']); - + my @flagdata; foreach (keys(%flags)) { my $key = $_; @@ -205,7 +207,7 @@ if ($delete){ if ($modify){ $template->param( modify => 1 ); } - + $template->param( startmenumember => join ('', startmenu('member')), endmenumember => join ('', endmenu('member')), member => $member, @@ -234,8 +236,8 @@ if ($delete){ expiry => $data->{'expiry'}, cardnumber => $cardnumber, dateofbirth => $data->{'dateofbirth'}); - + print "Content-Type: text/html\n\n", $template->output; - + } diff --git a/modbib.pl b/modbib.pl index 859dbe3117..4c0b47ba28 100755 --- a/modbib.pl +++ b/modbib.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to modify/delete biblios #written 8/11/99 # modified 11/11/99 by chris@katipo.co.nz @@ -39,7 +41,7 @@ my $sub = $subject->[0]->{'subject'}; my $additional = $addauthor->[0]->{'author'}; my %inputs; my $dewey; -my $submit=$input->param('submit.x'); +my $submit=$input->param('submit.x'); if ($submit eq '') { print $input->redirect("/cgi-bin/koha/delbiblio.pl?biblio=$bibnum"); } # if diff --git a/modbibitem.pl b/modbibitem.pl index 1a392ddb63..0e59b602f5 100755 --- a/modbibitem.pl +++ b/modbibitem.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to modify/delete groups #written 8/11/99 @@ -36,7 +38,7 @@ my $bibitemnum=$input->param('bibitem'); my $data=bibitemdata($bibitemnum); my $biblio=$input->param('biblio'); my $submit=$input->param('submit.x'); -if ($submit eq ''){ +if ($submit eq ''){ print $input->redirect("deletebiblioitem.pl?biblioitemnumber=$bibitemnum&biblionumber=$biblio"); } print $input->header; @@ -54,14 +56,14 @@ my %inputs; #the value is a tab separated list, the first item being the input type #$inputs{'Author'}="text\t$data->{'author'}\t0"; #$inputs{'Title'}="text\t$data->{'title'}\t1"; -my $dewey = $data->{'dewey'}; -$dewey =~ s/0+$//; -if ($dewey eq "000.") { $dewey = "";}; -if ($dewey < 10){$dewey='00'.$dewey;} -if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;} -if ($dewey <= 0){ - $dewey=''; -} +my $dewey = $data->{'dewey'}; +$dewey =~ s/0+$//; +if ($dewey eq "000.") { $dewey = "";}; +if ($dewey < 10){$dewey='00'.$dewey;} +if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;} +if ($dewey <= 0){ + $dewey=''; +} $dewey=~ s/\.$//; $inputs{'Class'}="text\t$data->{'classification'}$dewey$data->{'subclass'}\t2"; $inputs{'Item Type'}="text\t$data->{'itemtype'}\t3"; @@ -89,7 +91,7 @@ print < {'biblionumber'}&type=intra>$data->{'title'} ($data->{'author'})
-Modify Group - $data->{'description'}

+Modify Group - $data->{'description'}

@@ -172,11 +174,11 @@ Tick ALL barcodes that changes are to apply too. Those left un-ticked will keep printend ; -my (@items)=itemissues($data->{'biblioitemnumber'}); -#print @items; -my $count=@items; +my (@items)=itemissues($data->{'biblioitemnumber'}); +#print @items; +my $count=@items; for (my $i=0;$i<$count;$i++){ - $items[$i]->{'datelastseen'} = slashifyDate($items[$i]->{'datelastseen'}); + $items[$i]->{'datelastseen'} = slashifyDate($items[$i]->{'datelastseen'}); print < @@ -203,10 +205,10 @@ print <HELP: You must click on the appropriate radio button (in the green boxes), and choose to either re-assign the item/s to a record already in the system, or modify this record. IF your changes only apply to some items, tick the appropriate ones and a new group record will be created automatically for them.
- +

 

- - + + printend ; diff --git a/moditem.pl b/moditem.pl index 33127c8ce5..ef7c86da7a 100755 --- a/moditem.pl +++ b/moditem.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to modify/delete biblios #written 8/11/99 # modified 11/11/99 by chris@katipo.co.nz @@ -56,14 +58,14 @@ my %inputs; #the value is a tab separated list, the first item being the input type #$inputs{'Author'}="text\t$data->{'author'}\t0"; #$inputs{'Title'}="text\t$data->{'title'}\t1"; -my $dewey = $data->{'dewey'}; -$dewey =~ s/0+$//; -if ($dewey eq "000.") { $dewey = "";}; -if ($dewey < 10){$dewey='00'.$dewey;} -if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;} -if ($dewey <= 0){ - $dewey=''; -} +my $dewey = $data->{'dewey'}; +$dewey =~ s/0+$//; +if ($dewey eq "000.") { $dewey = "";}; +if ($dewey < 10){$dewey='00'.$dewey;} +if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;} +if ($dewey <= 0){ + $dewey=''; +} $dewey=~ s/\.$//; $inputs{'Barcode'}="text\t$item->{'barcode'}\t0"; $inputs{'Class'}="hidden\t$data->{'classification'}$dewey$data->{'subclass'}\t2"; @@ -140,17 +142,17 @@ if ($item->{'wthdrawn'} ==0){ } print <No
- +
-
- + printend ; diff --git a/moredetail.pl b/moredetail.pl index 674f82f2b5..fd67f84aec 100755 --- a/moredetail.pl +++ b/moredetail.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + # Copyright 2000-2002 Katipo Communications # # This file is part of Koha. @@ -25,7 +27,7 @@ use CGI; use C4::Search; use C4::Acquisitions; use C4::Output; # contains gettemplate - + my $query=new CGI; my $includes = C4::Context->config('includes') || @@ -35,7 +37,7 @@ my $startfrom=$query->param('startfrom') || 0; my $template = gettemplate("catalogue/moredetail.tmpl"); -# get variables +# get variables my $biblionumber=$query->param('bib'); my $title=$query->param('title'); @@ -87,7 +89,6 @@ foreach my $item (@items){ } else { $item->{'issue'}="Currently on issue to: {'borrower0'}>$item->{'card'}
"; } - } $template->param(includesdir => $includes); diff --git a/moremember.pl b/moremember.pl index 2baeec28d2..a4cd0347ce 100755 --- a/moremember.pl +++ b/moremember.pl @@ -1,10 +1,12 @@ #!/usr/bin/perl +# $Id$ + # script to do a borrower enquiry/bring up borrower details etc # Displays all the details about a borrower # written 20/12/99 by chris@katipo.co.nz # last modified 21/1/2000 by chris@katipo.co.nz -# modified 31/1/2001 by chris@katipo.co.nz +# modified 31/1/2001 by chris@katipo.co.nz # to not allow items on request to be renewed # # needs html removed and to use the C4::Output more, but its tricky @@ -88,7 +90,7 @@ if ($data->{'categorycode'} ne 'C'){ cardnumber => $guarantees->[$i]->{'cardnumber'}}); } $template->param(guaranteeloop => \@guaranteedata); - + } else { my ($guarantor)=findguarantor($data->{'borrowernumber'}); unless ($guarantor->{'borrowernumber'} == 0){ @@ -100,8 +102,8 @@ my %bor; $bor{'borrowernumber'}=$bornum; # FIXME -# it looks like $numaccts is a temp variable and that the -# for (my $i;$i<$numaccts;$i+++) +# it looks like $numaccts is a temp variable and that the +# for (my $i;$i<$numaccts;$i++) # can be turned into a foreach loop instead # my ($numaccts,$accts,$total)=getboracctrecord('',\%bor); @@ -114,7 +116,7 @@ for (my$i=0;$i<$numaccts;$i++){ my $amount2= $accts->[$i]{'amountoutstanding'} + 0.00; my %row = %$accts->[$i]; if ($amount2 != 0){ - my $item="   "; + my $item="   "; $row{'date'} = slashifyDate($accts->[$i]{'date'}); if ($accts->[$i]{'accounttype'} ne 'Res'){ @@ -142,7 +144,7 @@ for (my $i=0;$i<$count;$i++){ my $datedue=ParseDate($issue->[$i]{'date_due'}); $issue->[$i]{'date_due'} = slashifyDate($issue->[$i]{'date_due'}); my %row = %{$issue->[$i]}; - if ($datedue < $today){ + if ($datedue < $today){ $row{'red'}=1; #print ""; } #find the charge for an item @@ -172,8 +174,8 @@ for (my $i=0;$i<$count;$i++){ my ($rescount,$reserves)=FindReserves('',$bornum); #From C4::Reserves2 # FIXME -# does it make sense to turn this into a foreach my $i (0..$rescount) -# kind of loop? +# does it make sense to turn this into a foreach my $i (0..$rescount) +# kind of loop? # my @reservedata; for (my $i=0;$i<$rescount;$i++){ diff --git a/newimember.pl b/newimember.pl index 4f740eccf1..271b25053c 100755 --- a/newimember.pl +++ b/newimember.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to print confirmation screen, then if accepted calls itself to insert data @@ -35,9 +37,9 @@ print $input->header; #get rest of data my %data; my @names=$input->param; -foreach my $key (@names){ - $data{$key}=$input->param($key); -} +foreach my $key (@names){ + $data{$key}=$input->param($key); +} my $ok=0; my $string="The following compulsary fields have been left blank. Please push the back button @@ -72,16 +74,16 @@ if ($ok ==1){ if ($valid != 1){ print "Invalid cardnumber"; } else { - + my @inputs; my $i=0; while (my ($key, $value) = each %data) { $value=~ s/\"/%22/g; $inputs[$i]=["hidden","$key","$value"]; - $i++; - } + $i++; + } $inputs[$i]=["submit","submit","submit"]; - print mkformnotable("/cgi-bin/koha/insertidata.pl",@inputs); + print mkformnotable("/cgi-bin/koha/insertidata.pl",@inputs); } } print endmenu('member'); diff --git a/overdue.pl b/overdue.pl index 0c1a4cfea1..1d20a7e38f 100755 --- a/overdue.pl +++ b/overdue.pl @@ -1,5 +1,6 @@ #!/usr/bin/perl +# $Id$ # Copyright 2000-2002 Katipo Communications # @@ -29,7 +30,7 @@ my $type=$input->param('type'); my $theme = $input->param('theme'); # only used if allowthemeoverride is set my %tmpldata = pathtotemplate ( template => 'overdue.tmpl', theme => $theme); -my $template = HTML::Template->new( filename => $tmpldata{'path'}, +my $template = HTML::Template->new( filename => $tmpldata{'path'}, die_on_bad_params => 0); my $duedate; my $bornum; @@ -57,7 +58,7 @@ while (my $data=$sth->fetchrow_hashref) { $duedate=$data->{'date_due'}; $bornum=$data->{'borrowernumber'}; $itemnum=$data->{'itemnumber'}; - + my $query="select concat(firstname,' ',surname),phone,emailaddress from borrowers where borrowernumber='$bornum'"; my $sth1=$dbh->prepare($query); $sth1->execute; @@ -101,5 +102,5 @@ $template->param( startmenureport => join ('', startmenu('report')), endmenureport => join ('', endmenu('report')), todaysdate => $todaysdate, overdueloop => \@overduedata ); - + print "Content-Type: text/html\n\n", $template->output; diff --git a/pay.pl b/pay.pl index a58b8f6d05..446a58b834 100755 --- a/pay.pl +++ b/pay.pl @@ -1,6 +1,8 @@ #!/usr/bin/perl -#wrriten 11/1/2000 by chris@katipo.oc.nz +# $Id$ + +#written 11/1/2000 by chris@katipo.oc.nz #part of the koha library system, script to facilitate paying off fines @@ -42,7 +44,7 @@ my $user=$input->remote_user; #get account details my %bor; -$bor{'borrowernumber'}=$bornum; +$bor{'borrowernumber'}=$bornum; my @names=$input->param; @@ -77,7 +79,7 @@ if ($check ==0){ if ($total ne ''){ recordpayment(\%env,$bornum,$total); } - my ($numaccts,$accts,$total)=getboracctrecord('',\%bor); + my ($numaccts,$accts,$total)=getboracctrecord('',\%bor); print startpage(); print startmenu('member'); @@ -143,7 +145,7 @@ printend } else { # my $quety=$input->query_string; # print $input->redirect("/cgi-bin/koha/sec/writeoff.pl?$quety"); - my%inp; + my%inp; my @name=$input->param; for (my $i=0;$i<@name;$i++){ my $test=$input->param($name[$i]); diff --git a/renewscript.pl b/renewscript.pl index 1f34d1b5fc..b6e7ab7bda 100755 --- a/renewscript.pl +++ b/renewscript.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #written 18/1/2000 by chris@katipo.co.nz #script to renew items from the web @@ -53,6 +55,6 @@ while ( my ($key, $value) = each %data) { renewbook(\%env,$bornum,$key); } } -} +} print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$bornum"); diff --git a/reports.pl b/reports.pl index 6234e360f6..2276b22d99 100755 --- a/reports.pl +++ b/reports.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to display reports #written 8/11/99 @@ -34,7 +36,7 @@ print startpage(); print startmenu('issue'); my @data; if ($type eq 'search'){ - @data=statsreport('search','something'); + @data=statsreport('search','something'); } if ($type eq 'issue'){ @data=statsreport('issue','today'); diff --git a/request.pl b/request.pl index 8ed764e440..675625c448 100755 --- a/request.pl +++ b/request.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to place reserves/requests #writen 2/1/00 by chris@katipo.oc.nz @@ -89,7 +91,7 @@ foreach my $dat (sort {$b->{'dateaccessioned'} cmp $a->{'dateaccessioned'}} @dat $dat->{'dewey'}=~ s/00$//; my $class="$dat->{'classification'}$dat->{'dewey'}$dat->{'subclass'}"; my $select; - if (($dat->{'notforloan'}) + if (($dat->{'notforloan'}) || ($dat->{'itemlost'} == 1)) { $select = "Cannot be reserved."; } else { @@ -215,7 +217,7 @@ print < Requesting:
-$dat->{'title'} +$dat->{'title'} ($dat->{'author'})

@@ -242,7 +244,7 @@ $priorityoptions -Next Available, +Next Available,
(or choose from list below) diff --git a/showbudget.pl b/showbudget.pl index 10f95bf729..2b49a94cdd 100755 --- a/showbudget.pl +++ b/showbudget.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to show list of budgets and bookfunds #written 4/2/00 by chris@katipo.co.nz #called as an include by the acquisitions index page @@ -53,7 +55,7 @@ for (my $i=0;$i<$count;$i++){ my $avail=$results[$i]->{'budgetamount'}-($spent+$comtd); print < -$results[$i]->{'bookfundname'} +$results[$i]->{'bookfundname'} $results[$i]->{'budgetamount'} EOP ; diff --git a/stats.pl b/stats.pl index 3df29d4ae0..49c604d415 100755 --- a/stats.pl +++ b/stats.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #written 14/1/2000 #script to display reports @@ -80,7 +82,7 @@ while ($i<$count){ my $temptotalr=0; my $temptotalres=0; my $temptotalren=0; - my $temptotalw=0; + my $temptotalw=0; for (my $i2=0;$i2<$count;$i2++){ $charge+=$charges[$i2]->{'amount'}; print mktablerow(6,'red',$charges[$i2]->{'description'},$charges[$i2]->{'accounttype'},$charges[$i2]->{'timestamp'}, @@ -98,7 +100,7 @@ while ($i<$count){ if ($charges[$i2]->{'accounttype'} eq 'R'){ $temptotalren+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'}; } - } + } } # my $branch= @@ -134,7 +136,7 @@ while ($i<$count){ my $time="$hour:$min:$sec"; my $time2="$payments[$i]{'date'}"; my $branch=Getpaidbranch($time2,$payments[$i]{'borrowernumber'}); - + if ($payments[$i]{'accounttype'} eq 'W'){ $totalw+=$payments[$i]{'amount'}; } else { @@ -153,7 +155,7 @@ while ($i<$count){ } # my $time2="$payments[$i]{'date'} $time"; - + print mktablerow(6,'white',"$payments[$i]{'firstname'} $payments[$i]{'surname'}", ,$payments[$i]{'accounttype'},"$payments[$i]{'date'} $time",$payments[$i]{'amount'} ,$branch); @@ -161,7 +163,7 @@ while ($i<$count){ $oldtime=$payments[$i]{'timestamp'}; $bornum=$payments[$i]{'borrowernumber'}; $i++; - + } print mktablerow('6','white','','','','','',''); } diff --git a/stats2.pl b/stats2.pl index ed4509956b..8944b027fc 100755 --- a/stats2.pl +++ b/stats2.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #written 14/1/2000 #script to display reports @@ -60,11 +62,11 @@ $date=UnixDate($date,'%Y-%m-%d'); $date2=UnixDate($date2,'%Y-%m-%d'); my $dbh = C4::Context->dbh; -my $query="select * +my $query="select * from accountlines,accountoffsets,borrowers where accountlines.borrowernumber=accountoffsets.borrowernumber and (accountlines.accountno=accountoffsets.accountno or accountlines.accountno -=accountoffsets.offsetaccount) and accountlines.timestamp >=20000621000000 +=accountoffsets.offsetaccount) and accountlines.timestamp >=20000621000000 and borrowers.borrowernumber=accountlines.borrowernumber group by accountlines.borrowernumber,accountlines.accountno"; my $sth=$dbh->prepare($query); diff --git a/subjectsearch.pl b/subjectsearch.pl index e5a4c3e5ad..ebfde88973 100755 --- a/subjectsearch.pl +++ b/subjectsearch.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to display detailed information #written 8/11/99 @@ -37,15 +39,15 @@ my $env; my $subject=$input->param('subject'); #my $title=$input->param('title'); -my $main; -my $secondary; -if ($type eq 'opac'){ - $main='#99cccc'; - $secondary='#efe5ef'; -} else { - $main='#99cc33'; - $secondary='#ffffcc'; -} +my $main; +my $secondary; +if ($type eq 'opac'){ + $main='#99cccc'; + $secondary='#efe5ef'; +} else { + $main='#99cc33'; + $secondary='#ffffcc'; +} my @items=subsearch(\$blah,$subject); #print @items; @@ -54,9 +56,9 @@ my $i=0; print center(); print mktablehdr; if ($type ne 'opac'){ - print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('LOCATION'),' ',"/images/background-mem.gif"); + print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('LOCATION'),' ',"/images/background-mem.gif"); } else { - print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('BRANCH'),'   '); + print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('BRANCH'),'   '); } my $colour=1; while ($i < $count){ @@ -66,45 +68,45 @@ while ($i < $count){ $word=~ s/ /%20/g; #$word=~ s/\,/\,%20/; $results[1]=mklink("/cgi-bin/koha/search.pl?author=$word&type=$type",$results[1]); - my ($count,$lcount,$nacount,$fcount,$scount)=itemcount($env,$results[2]); - $results[3]=$count; - if ($nacount > 0){ - $results[4]=$results[4]."On Loan"; + my ($count,$lcount,$nacount,$fcount,$scount)=itemcount($env,$results[2]); + $results[3]=$count; + if ($nacount > 0){ + $results[4]=$results[4]."On Loan"; if ($nacount > 1){ $results[4].=" $nacount"; } $results[4].=" "; - } - if ($lcount > 0){ - $results[4]=$results[4]." Levin"; + } + if ($lcount > 0){ + $results[4]=$results[4]." Levin"; if ($lcount > 1){ $results[4].=" $lcount"; } $results[4].=" "; - } - if ($fcount > 0){ - $results[4]=$results[4]." Foxton"; + } + if ($fcount > 0){ + $results[4]=$results[4]." Foxton"; if ($fcount > 1){ $results[4].=" $fcount"; } $results[4].=" "; - } - if ($scount > 0){ - $results[4]=$results[4]." Shannon"; + } + if ($scount > 0){ + $results[4]=$results[4]." Shannon"; if ($scount > 1){ $results[4].=" $scount"; } $results[4].=" "; - } + } if ($type ne 'opac'){ $results[6]=mklink("/cgi-bin/koha/request.pl?bib=$results[2]","Request"); } - if ($colour == 1){ - print mktablerow(5,$secondary,$results[0],$results[1],$results[3],$results[4],$results[6]); - $colour=0; - } else{ - print mktablerow(5,'white',$results[0],$results[1],$results[3],$results[4],$results[6]); - $colour=1; + if ($colour == 1){ + print mktablerow(5,$secondary,$results[0],$results[1],$results[3],$results[4],$results[6]); + $colour=0; + } else{ + print mktablerow(5,'white',$results[0],$results[1],$results[3],$results[4],$results[6]); + $colour=1; } $i++; } diff --git a/tidyaccounts.pl b/tidyaccounts.pl index 31783bf791..bebc1d05c3 100755 --- a/tidyaccounts.pl +++ b/tidyaccounts.pl @@ -1,4 +1,7 @@ #!/usr/bin/perl + +# $Id$ + # # written 31/5/00 by chris@katipo.co.nz to make a way to fix account mistakes # @@ -37,13 +40,13 @@ my @name=$input->param; foreach my $key (@name){ if ($key ne 'bornum'){ my $temp=$input->param($key); - + # print $temp,$key; if ($temp ne ''){ fixaccounts($bornum,$key,$temp); - + } } } - + print $input->redirect("boraccount.pl?bornum=$bornum"); diff --git a/updatebibitem.pl b/updatebibitem.pl index f8c6cb642a..cf19a3ecd7 100755 --- a/updatebibitem.pl +++ b/updatebibitem.pl @@ -1,5 +1,6 @@ #!/usr/bin/perl +# $Id$ # Copyright 2000-2002 Katipo Communications # @@ -69,7 +70,7 @@ if ($class =~/[0-9]+/) { } # else my (@items) = &itemissues($bibitemnum); -#print @items; +#print @items; my $count = @items; #print $count; my @barcodes; @@ -136,7 +137,7 @@ if ($existing eq 'YES'){ }); } } - + } elsif ($flag2 eq 'leastone') { &modbibitem({ biblioitemnumber => $bibitemnum, @@ -160,16 +161,16 @@ if ($existing eq 'YES'){ } else { $loan=0; } - for (my $i=0;$i<$count;$i++){ - if ($barcodes[$i] ne ''){ + for (my $i=0;$i<$count;$i++){ + if ($barcodes[$i] ne ''){ moditem( {biblionumber => $bibnum, loan => $loan, itemnumber => $items[$i]->{'itemnumber'}, bibitemnum => $bibitemnum }); - } + } } - + } else { &modbibitem({ biblioitemnumber => $bibitemnum, diff --git a/updatecharges.pl b/updatecharges.pl index 07f0985c78..4241d73f61 100755 --- a/updatecharges.pl +++ b/updatecharges.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# $Id$ + #script to update charges for overdue in database #updates categoryitem # is called by charges.pl @@ -39,14 +41,14 @@ my $dbh = C4::Context->dbh; my @names=$input->param(); foreach my $key (@names){ - + my $bor=substr($key,0,1); my $cat=$key; $cat =~ s/[A-Z]//i; my $data=$input->param($key); my @dat=split(',',$data); # print "$bor $cat $dat[0] $dat[1] $dat[2]
"; - my $sth=$dbh->prepare("Update categoryitem set fine=$dat[0],startcharge=$dat[1],chargeperiod=$dat[2] where + my $sth=$dbh->prepare("Update categoryitem set fine=$dat[0],startcharge=$dat[1],chargeperiod=$dat[2] where categorycode='$bor' and itemtype='$cat'"); $sth->execute; $sth->finish; diff --git a/updateitem.pl b/updateitem.pl index 16390e0296..c280b1356b 100755 --- a/updateitem.pl +++ b/updateitem.pl @@ -1,5 +1,6 @@ #!/usr/bin/perl +# $Id$ # Copyright 2000-2002 Katipo Communications # @@ -111,11 +112,11 @@ if ($wthdrawn == 0 && $override ne 'yes'){ } print $input->redirect("moredetail.pl?type=intra&bib=$bibnum&bi=$bibitemnum"); } else { - + # print "marking cancelled"; #need to check if it is on reserve or issued my $dbh = C4::Context->dbh; - my $flag=0; + my $flag=0; my ($resbor,$resrec)=C4::Circulation::Circ2::checkreserve($env,$dbh,$itemnum); # print $resbor; if ($resbor){ @@ -123,7 +124,7 @@ if ($wthdrawn == 0 && $override ne 'yes'){ print "The biblio or biblioitem this item belongs to has a reserve on it"; $flag=1; } - my $sth=$dbh->prepare("Select * from issues where (itemnumber='$itemnum') and (returndate is null)"); + my $sth=$dbh->prepare("Select * from issues where (itemnumber='$itemnum') and (returndate is null)"); $sth->execute; my $data=$sth->fetchrow_hashref; if ($data->{'borrowernumber'} ne '') { @@ -160,4 +161,3 @@ sub checkinp{ } #sub checkissue{ - diff --git a/updatewebsite.pl b/updatewebsite.pl index bde44b0a47..a17596c7bd 100755 --- a/updatewebsite.pl +++ b/updatewebsite.pl @@ -1,5 +1,6 @@ #!/usr/bin/perl +# $Id$ # Copyright 2000-2002 Katipo Communications # @@ -39,7 +40,7 @@ if ($input->param('delete')) { } elsif (! $biblionumber) { print $input->redirect("/catalogue/"); - + } elsif (! $websitenumber) { print $input->redirect("modwebsites.pl?biblionumber=$biblionumber");