From 6c871b7847e542c93327754cb399f3d0a146dfe5 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Mon, 1 Oct 2007 18:24:07 -0500 Subject: [PATCH] Fix for a bug in reserves, if a charge was incurred we got a server error, and it wasnt listing the itemtypes available Signed-off-by: Chris Cormack --- C4/Reserves.pm | 1 + opac/opac-reserve.pl | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 3d948a2c10..a2c9d3a2a4 100755 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -30,6 +30,7 @@ use C4::Context; use C4::Biblio; use C4::Search; use C4::Circulation; +use C4::Accounts; our ($VERSION,@ISA,@EXPORT,@EXPORT_OK,%EXPORT_TAGS); diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 5e85aa8b15..4c2794d967 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -28,6 +28,7 @@ use C4::Date; use C4::Context; use C4::Members; use C4::Branch; # GetBranches +use Data::Dumper; my $MAXIMUM_NUMBER_OF_RESERVES = C4::Context->preference("maxreserves"); @@ -100,8 +101,7 @@ $template->param( CGIbranch => $CGIbranchloop ); #### THIS IS A BIT OF A HACK BECAUSE THE BIBLIOITEMS DATA IS A LITTLE MESSED UP! # get the itemtype data.... -my @items = GetItemInfosOf($biblionumber); - +my @items = GetItemsInfo($biblionumber); ####################################################### # old version, add so that old templates still work my %types_old; @@ -143,11 +143,11 @@ $template->param( itemcount => $itemcount ); my %types; my %itemtypes; my @duedates; +#die @items; foreach my $itm (@items) { push @duedates, { date_due => format_date( $itm->{'date_due'} ) } if defined $itm->{'date_due'}; $itm->{ $itm->{'publictype'} } = 1; - my $fee = GetReserveFee( undef, $borrowernumber, $itm->{'biblionumber'}, 'a', ( $itm->{'biblioitemnumber'} ) ); $fee = sprintf "%.02f", $fee; -- 2.39.5