From f3fd911dc89d205d0fece785fc2d5d8decb9563b Mon Sep 17 00:00:00 2001 From: alaurin Date: Tue, 30 May 2006 12:03:54 +0000 Subject: [PATCH] bugfixing of the itemtypes infos in branchreserves,currenttransfers,waitingreservestransfers --- circ/branchreserves.pl | 4 +++- circ/currenttransfers.pl | 4 +++- circ/waitingreservestransfers.pl | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/circ/branchreserves.pl b/circ/branchreserves.pl index cae4210837..be67842755 100755 --- a/circ/branchreserves.pl +++ b/circ/branchreserves.pl @@ -30,6 +30,7 @@ use C4::Circulation::Circ2; use Date::Manip; use C4::Reserves2; use C4::Search; +use C4::Koha; my $input = new CGI; @@ -103,6 +104,7 @@ foreach my $num (@getreserves) { my %env; my $gettitle = getiteminformation(\%env,$num->{'itemnumber'}); my $getborrower = getpatroninformation (\%env,$num->{'borrowernumber'}); + my $itemtypeinfo = getitemtypeinfo($gettitle->{'itemtype'}); $getreserv{'waitingdate'} = format_date($num->{'waitingdate'}); my $calcDate=DateCalc($num->{'waitingdate'},"+".C4::Context->preference('ReservesMaxPickUpDelay')." days"); my $warning=Date_Cmp(ParseDate("today"),$calcDate); @@ -113,7 +115,7 @@ foreach my $num (@getreserves) { $getreserv{'itemnumber'} = $gettitle->{'itemnumber'}; $getreserv{'biblionumber'} = $gettitle->{'biblionumber'}; $getreserv{'barcode'} = $gettitle->{'barcode'}; -# $getreserv{'itemtype'} = ItemType($gettitle->{'itemtype'}); + $getreserv{'itemtype'} = $itemtypeinfo->{'description'}; $getreserv{'homebranch'} = $gettitle->{'homebranch'}; $getreserv{'holdingbranch'} = $gettitle->{'holdingbranch'}; if ($gettitle->{'homebranch'} ne $gettitle->{'holdingbranch'}){ diff --git a/circ/currenttransfers.pl b/circ/currenttransfers.pl index 043280e78a..4f0271aa19 100755 --- a/circ/currenttransfers.pl +++ b/circ/currenttransfers.pl @@ -78,12 +78,14 @@ foreach my $br (keys %$branches) { $getransf{'messcompa'} = 1; } my $gettitle = getiteminformation(\%env,$num->{'itemnumber'}); + my $itemtypeinfo = getitemtypeinfo($gettitle->{'itemtype'}); + $getransf{'title'} = $gettitle->{'title'}; $getransf{'datetransfer'} = format_date($num->{'datesent'}); $getransf{'biblionumber'} = $gettitle->{'biblionumber'}; $getransf{'itemnumber'} = $gettitle->{'itemnumber'}; $getransf{'barcode'} = $gettitle->{'barcode'}; -# $getransf{'itemtype'} = ItemType($gettitle->{'itemtype'}); + $getransf{'itemtype'} = $itemtypeinfo->{'description'}; $getransf{'homebranch'} = $gettitle->{'homebranch'}; $getransf{'holdingbranch'} = $gettitle->{'holdingbranch'}; $getransf{'itemcallnumber'} = $gettitle->{'itemcallnumber'}; diff --git a/circ/waitingreservestransfers.pl b/circ/waitingreservestransfers.pl index 7a6fabae32..c5fcaf16ad 100755 --- a/circ/waitingreservestransfers.pl +++ b/circ/waitingreservestransfers.pl @@ -74,6 +74,7 @@ foreach my $br (keys %$branches) { my %getreserv; my %env; my $gettitle = getiteminformation(\%env,$num->{'itemnumber'}); + my $itemtypeinfo = getitemtypeinfo($gettitle->{'itemtype'}); if ($gettitle->{'holdingbranch'} eq $default){ my $getborrower = getpatroninformation (\%env,$num->{'borrowernumber'}); $getreserv{'reservedate'} = format_date($num->{'reservedate'}); @@ -86,7 +87,7 @@ foreach my $br (keys %$branches) { $getreserv{'biblionumber'} = $gettitle->{'biblionumber'}; $getreserv{'itemnumber'} = $gettitle->{'itemnumber'}; $getreserv{'barcode'} = $gettitle->{'barcode'}; -# $getreserv{'itemtype'} = get_iteminfos_of($gettitle->{'itemtype'}->{'description'}); + $getreserv{'itemtype'} = $itemtypeinfo->{'description'}; $getreserv{'holdingbranch'} = $gettitle->{'holdingbranch'}; $getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'}; $getreserv{'borrowernum'} = $getborrower->{'borrowernumber'}; -- 2.39.5