[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha acqui/finishreceive.pl C4/Accounts2.pm C4/... [rel_3_0]
From: |
Antoine Farnault |
Subject: |
[Koha-cvs] koha acqui/finishreceive.pl C4/Accounts2.pm C4/... [rel_3_0] |
Date: |
Wed, 30 Aug 2006 16:38:51 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_3_0
Changes by: Antoine Farnault <toins> 06/08/30 16:38:51
Modified files:
acqui : finishreceive.pl
C4 : Accounts2.pm Reserves2.pm
C4/Circulation : Circ2.pm
circ : branchreserves.pl branchtransfers.pl
circulation.pl returns.pl
waitingreservestransfers.pl
opac : opac-user.pl
reserve : placerequest.pl request.pl
Log message:
delete param '$env' in the function getiteminformation.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/finishreceive.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.20&r2=1.20.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Accounts2.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.30&r2=1.30.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Reserves2.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.46&r2=1.46.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Circ2.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.114&r2=1.114.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/circ/branchreserves.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.2&r2=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/circ/branchtransfers.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.24&r2=1.24.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/circ/circulation.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.97&r2=1.97.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/circ/returns.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.43&r2=1.43.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/circ/waitingreservestransfers.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.4&r2=1.4.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-user.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.23&r2=1.23.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/reserve/placerequest.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.3&r2=1.3.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/reserve/request.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.6&r2=1.6.2.1
Patches:
Index: acqui/finishreceive.pl
===================================================================
RCS file: /sources/koha/koha/acqui/finishreceive.pl,v
retrieving revision 1.20
retrieving revision 1.20.2.1
diff -u -b -r1.20 -r1.20.2.1
--- acqui/finishreceive.pl 1 Aug 2006 15:04:33 -0000 1.20
+++ acqui/finishreceive.pl 30 Aug 2006 16:38:51 -0000 1.20.2.1
@@ -226,7 +226,7 @@
elsif ( $itemtype ne 'P' && $itemtype ne 'PP' ) { # chris's new if
bit
my %env;
- my $item = getiteminformation( \%env, 0, $barcode );
+ my $item = getiteminformation(0, $barcode );
my ( $resfound, $resrec ) = CheckReserves( 0, $barcode );
if ($resfound) { # reserves is found
@@ -260,7 +260,7 @@
}
else {
print $input->redirect(
- "/cgi-bin/koha/loadmodules.pl?module=acquisitions")
+ "/cgi-bin/koha/acqui/acqui-home.pl")
; # chris's new bit
} # end of if
}
Index: C4/Accounts2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Accounts2.pm,v
retrieving revision 1.30
retrieving revision 1.30.2.1
diff -u -b -r1.30 -r1.30.2.1
--- C4/Accounts2.pm 23 May 2006 10:00:01 -0000 1.30
+++ C4/Accounts2.pm 30 Aug 2006 16:38:51 -0000 1.30.2.1
@@ -18,7 +18,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: Accounts2.pm,v 1.30 2006/05/23 10:00:01 btoumi Exp $
+# $Id: Accounts2.pm,v 1.30.2.1 2006/08/30 16:38:51 toins Exp $
use strict;
require Exporter;
use DBI;
@@ -29,7 +29,7 @@
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.30 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.30.2.1 $' =~ /\d+/g;
shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
=head1 NAME
@@ -372,7 +372,7 @@
my $accdata = "";
my $amountleft = $data;
if ($barcode ne ''){
- my $item=getiteminformation($env,'',$barcode);
+ my $item=getiteminformation('',$barcode);
my $nextaccntno = getnextacctno($env,$bornumber,$dbh);
my $query="Select * from accountlines where (borrowernumber=?
and itemnumber=? and amountoutstanding > 0)";
Index: C4/Reserves2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Reserves2.pm,v
retrieving revision 1.46
retrieving revision 1.46.2.1
diff -u -b -r1.46 -r1.46.2.1
--- C4/Reserves2.pm 7 Jun 2006 02:04:48 -0000 1.46
+++ C4/Reserves2.pm 30 Aug 2006 16:38:51 -0000 1.46.2.1
@@ -3,7 +3,7 @@
package C4::Reserves2;
-# $Id: Reserves2.pm,v 1.46 2006/06/07 02:04:48 sushi Exp $
+# $Id: Reserves2.pm,v 1.46.2.1 2006/08/30 16:38:51 toins Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -106,7 +106,7 @@
my ($restype,$checkreserves) = CheckReserves($itemnumber);
if ($checkreserves){
my %env;
- my $iteminfo =
C4::Circulation::Circ2::getiteminformation(\%env,$itemnumber);
+ my $iteminfo =
C4::Circulation::Circ2::getiteminformation($itemnumber);
if ($iteminfo->{'holdingbranch'} ne
$checkreserves->{'branchcode'}){
$messages->{'transfert'} = $checkreserves->{'branchcode'};
Index: C4/Circulation/Circ2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.114
retrieving revision 1.114.2.1
diff -u -b -r1.114 -r1.114.2.1
--- C4/Circulation/Circ2.pm 21 Jul 2006 13:57:02 -0000 1.114
+++ C4/Circulation/Circ2.pm 30 Aug 2006 16:38:51 -0000 1.114.2.1
@@ -3,7 +3,7 @@
package C4::Circulation::Circ2;
-# $Id: Circ2.pm,v 1.114 2006/07/21 13:57:02 toins Exp $
+# $Id: Circ2.pm,v 1.114.2.1 2006/08/30 16:38:51 toins Exp $
#package to deal with Returns
#written 3/11/99 by address@hidden
@@ -333,14 +333,12 @@
=over 4
-$item = &getiteminformation($env, $itemnumber, $barcode);
+$item = &getiteminformation($itemnumber, $barcode);
Looks up information about an item, given either its item number or
its barcode. If C<$itemnumber> is a nonzero value, it is used;
otherwise, C<$barcode> is used.
-C<$env> is effectively ignored, but should be a reference-to-hash.
-
C<$item> is a reference-to-hash whose keys are fields from the biblio,
items, and biblioitems tables of the Koha database. It may also
contain the following keys:
@@ -369,9 +367,10 @@
sub getiteminformation {
# returns a hash of item information given either the itemnumber or the barcode
- my ($env, $itemnumber, $barcode) = @_;
+ my ($itemnumber, $barcode) = @_;
my $dbh = C4::Context->dbh;
my $sth;
+ my $env;
if ($itemnumber) {
$sth=$dbh->prepare("select * from biblio,items,biblioitems
where items.itemnumber=? and biblio.biblionumber=items.biblionumber and
biblioitems.biblioitemnumber = items.biblioitemnumber");
$sth->execute($itemnumber);
@@ -484,7 +483,7 @@
my %env;
my $dotransfer = 1;
my $branches = GetBranches();
- my $iteminformation = getiteminformation(\%env, 0, $barcode);
+ my $iteminformation = getiteminformation(0, $barcode);
# bad barcode..
if (not $iteminformation) {
$messages->{'BadBarcode'} = $barcode;
@@ -783,7 +782,7 @@
my ($env,$borrower,$barcode,$year,$month,$day,$inprocess) = @_;
my %needsconfirmation; # filled with problems that needs confirmations
my %issuingimpossible; # filled with problems that causes the issue to
be IMPOSSIBLE
- my $iteminformation = getiteminformation($env, 0, $barcode);
+ my $iteminformation = getiteminformation(0, $barcode);
my $dbh = C4::Context->dbh;
#
# DUE DATE is OK ?
@@ -935,7 +934,7 @@
my ($env,$borrower,$barcode,$date,$cancelreserve) = @_;
my $dbh = C4::Context->dbh;
# my ($borrower, $flags) = &getpatroninformation($env, $borrowernumber,
0);
- my $iteminformation = getiteminformation($env, 0, $barcode);
+ my $iteminformation = getiteminformation(0, $barcode);
# warn "B : ".$borrower->{borrowernumber}." / I :
".$iteminformation->{'itemnumber'};
#
# check if we just renew the issue.
@@ -1153,7 +1152,7 @@
my $doreturn = 1;
die '$branch not defined' unless defined $branch; # just in case (bug
170)
# get information on item
- my ($iteminformation) = getiteminformation(\%env, 0, $barcode);
+ my ($iteminformation) = getiteminformation(0, $barcode);
if (not $iteminformation) {
$messages->{'BadBarcode'} = $barcode;
$doreturn = 0;
@@ -1842,7 +1841,7 @@
# book's loan length to today's date.
if ($datedue eq "" ) {
#debug_msg($env, "getting date");
- my $iteminformation = getiteminformation($env, $itemno,0);
+ my $iteminformation = getiteminformation($itemno,0);
my $borrower = getpatroninformation($env,$bornum,0);
my $loanlength =
getLoanLength($borrower->{'categorycode'},$iteminformation->{'itemtype'},$borrower->{'branchcode'});
$datedue = UnixDate(DateCalc("today","$loanlength
days"),"%Y-%m-%d");
@@ -1869,7 +1868,7 @@
my ($charge,$type)=calc_charges($env, $itemno, $bornum);
if ($charge > 0){
my $accountno=getnextacctno($env,$bornum,$dbh);
- my $item=getiteminformation($env, $itemno);
+ my $item=getiteminformation($itemno);
$sth=$dbh->prepare("Insert into accountlines
(borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber)
values
(?,?,now(),?,?,?,?,?)");
$sth->execute($bornum,$accountno,$charge,"Renewal of Rental
Item $item->{'title'} $item->{'barcode'}",'Rent',$charge,$itemno);
@@ -1983,7 +1982,7 @@
my ($itemno) = @_;
my %env;
my $dbh = C4::Context->dbh;
- my ($itemdata) = getiteminformation(\%env, $itemno,0);
+ my ($itemdata) = getiteminformation($itemno,0);
my $bibno = $dbh->quote($itemdata->{'biblionumber'});
my $bibitm = $dbh->quote($itemdata->{'biblioitemnumber'});
my $sth = $dbh->prepare("select * from reserves where ((found = 'W') or
(found is null)) and biblionumber = ? and cancellationdate is NULL order by
priority, reservedate");
Index: circ/branchreserves.pl
===================================================================
RCS file: /sources/koha/koha/circ/branchreserves.pl,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -b -r1.2 -r1.2.2.1
--- circ/branchreserves.pl 30 May 2006 12:03:54 -0000 1.2
+++ circ/branchreserves.pl 30 Aug 2006 16:38:51 -0000 1.2.2.1
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: branchreserves.pl,v 1.2 2006/05/30 12:03:54 alaurin Exp $
+# $Id: branchreserves.pl,v 1.2.2.1 2006/08/30 16:38:51 toins Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -69,7 +69,7 @@
# if we have a result
if ($nextreservinfo){
my $borrowerinfo =
getpatroninformation(\%env,$nextreservinfo);
- my $iteminfo =
C4::Circulation::Circ2::getiteminformation(\%env,$item);
+ my $iteminfo =
C4::Circulation::Circ2::getiteminformation($item);
if ($messages->{'transfert'}){
my $branchname =
getbranchname($messages->{'transfert'});
$template->param(
Index: circ/branchtransfers.pl
===================================================================
RCS file: /sources/koha/koha/circ/branchtransfers.pl,v
retrieving revision 1.24
retrieving revision 1.24.2.1
diff -u -b -r1.24 -r1.24.2.1
--- circ/branchtransfers.pl 21 Jul 2006 10:10:29 -0000 1.24
+++ circ/branchtransfers.pl 30 Aug 2006 16:38:51 -0000 1.24.2.1
@@ -166,7 +166,7 @@
$item{barcode}=$bc;
$item{frombrcd}=$frbcd;
$item{tobrcd}=$tobcd;
- my ($iteminformation) = getiteminformation(\%env, 0, $bc);
+ my ($iteminformation) = getiteminformation( 0, $bc);
($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
$item{'color'}=$color;
$item{'biblionumber'}=$iteminformation->{'biblionumber'};
Index: circ/circulation.pl
===================================================================
RCS file: /sources/koha/koha/circ/circulation.pl,v
retrieving revision 1.97
retrieving revision 1.97.2.1
diff -u -b -r1.97 -r1.97.2.1
--- circ/circulation.pl 21 Jul 2006 10:10:29 -0000 1.97
+++ circ/circulation.pl 30 Aug 2006 16:38:51 -0000 1.97.2.1
@@ -243,7 +243,7 @@
foreach my $num_res (@borrowerreserv) {
my %getreserv;
my %env;
- my $getiteminfo =
getiteminformation(\%env,$num_res->{'itemnumber'});
+ my $getiteminfo = getiteminformation($num_res->{'itemnumber'});
my $itemtypeinfo = getitemtypeinfo($getiteminfo->{'itemtype'});
my ($transfertwhen,$transfertfrom,$transfertto) =
checktransferts($num_res->{'itemnumber'});
@@ -571,7 +571,7 @@
# my @itemswaiting;
# foreach my $item (@$items) {
# my ($iteminformation) =
-# getiteminformation( \%env, $item->{'itemnumber'}, 0 );
+# getiteminformation($item->{'itemnumber'}, 0 );
# $iteminformation->{'branchname'} =
# $branches->{ $iteminformation->{'holdingbranch'} }
# ->{'branchname'};
@@ -596,7 +596,7 @@
my @itemswaiting;
foreach my $item (@$items) {
my ($iteminformation) =
- getiteminformation( \%env, $item->{'itemnumber'}, 0
);
+ getiteminformation($item->{'itemnumber'}, 0 );
push @itemswaiting, $iteminformation;
}
}
Index: circ/returns.pl
===================================================================
RCS file: /sources/koha/koha/circ/returns.pl,v
retrieving revision 1.43
retrieving revision 1.43.2.1
diff -u -b -r1.43 -r1.43.2.1
--- circ/returns.pl 21 Jul 2006 10:10:29 -0000 1.43
+++ circ/returns.pl 30 Aug 2006 16:38:51 -0000 1.43.2.1
@@ -111,7 +111,7 @@
my $resbarcode = $query->param('resbarcode');
# set to waiting....
- my $iteminfo = getiteminformation( \%env, $item );
+ my $iteminfo = getiteminformation($item );
my $tobranchcd = ReserveWaiting( $item, $borrnum );
# if($iteminfo->{'holdingbranch'} ne $branch){
# UpdateHoldingbranch($branch,$item);
@@ -219,7 +219,7 @@
# my ($borr) = getpatroninformation( \%env, $res->{'borrowernumber'}, 0 );
# my $name =
# $borr->{'surname'} . " " . $borr->{'title'} . " " .
$borr->{'firstname'};
- my ($iteminfo) = getiteminformation( \%env, 0, $barcode );
+ my ($iteminfo) = getiteminformation( 0, $barcode );
# if ( $res->{'ResFound'} eq "Waiting" ) {
# if($branch eq $res->{'branchcode'}){
@@ -242,7 +242,7 @@
my ($borr) = getpatroninformation( \%env, $res->{'borrowernumber'}, 0 );
my $name =
$borr->{'surname'} . " " . $borr->{'title'} . " " . $borr->{'firstname'};
- my ($iteminfo) = getiteminformation( \%env, 0, $barcode );
+ my ($iteminfo) = getiteminformation( 0, $barcode );
if ( $res->{'ResFound'} eq "Waiting" ) {
if($branch eq $res->{'branchcode'}){
@@ -397,7 +397,7 @@
my $items = $flags->{$flag}->{'itemlist'};
foreach my $item (@$items) {
my ($iteminformation) =
- getiteminformation( \%env, $item->{'itemnumber'}, 0 );
+ getiteminformation( $item->{'itemnumber'}, 0 );
my %waitingitem;
$waitingitem{biblionum} = $iteminformation->{'biblionumber'};
$waitingitem{barcode} = $iteminformation->{'barcode'};
@@ -416,7 +416,7 @@
@$items )
{
my ($iteminformation) =
- getiteminformation( \%env, $item->{'itemnumber'}, 0 );
+ getiteminformation( $item->{'itemnumber'}, 0 );
my %overdueitem;
$overdueitem{duedate} = format_date($item->{'date_due'});
$overdueitem{biblionum} = $iteminformation->{'biblionumber'};
@@ -487,7 +487,7 @@
$ri{bornum} = $riborrowernumber{$_};
}
# my %ri;
- my ($iteminformation) = getiteminformation( \%env, 0, $barcode );
+ my ($iteminformation) = getiteminformation( 0, $barcode );
$ri{color} = $color;
$ri{itembiblionumber} = $iteminformation->{'biblionumber'};
$ri{itemtitle} = $iteminformation->{'title'};
Index: circ/waitingreservestransfers.pl
===================================================================
RCS file: /sources/koha/koha/circ/waitingreservestransfers.pl,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -b -r1.4 -r1.4.2.1
--- circ/waitingreservestransfers.pl 21 Jul 2006 10:10:29 -0000 1.4
+++ circ/waitingreservestransfers.pl 30 Aug 2006 16:38:51 -0000 1.4.2.1
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: waitingreservestransfers.pl,v 1.4 2006/07/21 10:10:29 toins Exp $
+# $Id: waitingreservestransfers.pl,v 1.4.2.1 2006/08/30 16:38:51 toins Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -73,7 +73,7 @@
foreach my $num (@getreserves) {
my %getreserv;
my %env;
- my $gettitle =
getiteminformation(\%env,$num->{'itemnumber'});
+ my $gettitle = getiteminformation($num->{'itemnumber'});
my $itemtypeinfo =
getitemtypeinfo($gettitle->{'itemtype'});
if ($gettitle->{'holdingbranch'} eq $default){
my $getborrower = getpatroninformation
(\%env,$num->{'borrowernumber'});
Index: opac/opac-user.pl
===================================================================
RCS file: /sources/koha/koha/opac/opac-user.pl,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -u -b -r1.23 -r1.23.2.1
--- opac/opac-user.pl 21 Jul 2006 09:51:42 -0000 1.23
+++ opac/opac-user.pl 30 Aug 2006 16:38:51 -0000 1.23.2.1
@@ -128,7 +128,7 @@
my $wcount = 0;
foreach my $res (@$reserves) {
if ($res->{'itemnumber'}) {
- my $item = getiteminformation('',$res->{'itemnumber'},'');
+ my $item = getiteminformation($res->{'itemnumber'},'');
$res->{'holdingbranch'} =
$branches->{$item->{'holdingbranch'}}->{'branchname'};
$res->{'branch'} = $branches->{$res->{'branchcode'}}->{'branchname'};
if($res->{'holdingbranch'} eq $res->{'branch'}){
Index: reserve/placerequest.pl
===================================================================
RCS file: /sources/koha/koha/reserve/placerequest.pl,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -b -r1.3 -r1.3.2.1
--- reserve/placerequest.pl 6 Jun 2006 12:26:57 -0000 1.3
+++ reserve/placerequest.pl 30 Aug 2006 16:38:51 -0000 1.3.2.1
@@ -51,9 +51,8 @@
#new op : if we have an item selectionned, and the pickup branch is the same
as the holdingbranch of the document, we force the value $rank and $found .
if ($checkitem ne ''){
$rank[0] = '0';
- my %env;
my $item = $checkitem;
- $item = getiteminformation(\%env,$item);
+ $item = getiteminformation($item);
if ( $item->{'holdingbranch'} eq $branch ){
$found = 'W';
}
Index: reserve/request.pl
===================================================================
RCS file: /sources/koha/koha/reserve/request.pl,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -b -r1.6 -r1.6.2.1
--- reserve/request.pl 21 Jul 2006 09:41:55 -0000 1.6
+++ reserve/request.pl 30 Aug 2006 16:38:51 -0000 1.6.2.1
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: request.pl,v 1.6 2006/07/21 09:41:55 toins Exp $
+# $Id: request.pl,v 1.6.2.1 2006/08/30 16:38:51 toins Exp $
#script to place reserves/requests
#writen 2/1/00 by address@hidden
@@ -346,7 +346,7 @@
if (($res->{'found'} eq 'W') or ($res->{'priority'} eq '0')) {
my %env;
my $item = $res->{'itemnumber'};
- $item = getiteminformation(\%env,$item);
+ $item = getiteminformation($item);
$reserve{'holdingbranch'}=$item->{'holdingbranch'};
$reserve{'barcode'}=$item->{'barcode'};
$reserve{'biblionumber'}=$item->{'biblionumber'};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha acqui/finishreceive.pl C4/Accounts2.pm C4/... [rel_3_0],
Antoine Farnault <=