From 8663e9c12185d55fe5d63e8b52bcff901b4436ca Mon Sep 17 00:00:00 2001 From: rangi Date: Sat, 14 Sep 2002 01:20:12 +0000 Subject: [PATCH] calc_charges expects to be passed a database handler, this wasnt happening, which was breaking this page --- moremember.pl | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/moremember.pl b/moremember.pl index ba2b691a0e..1c3e439199 100755 --- a/moremember.pl +++ b/moremember.pl @@ -37,6 +37,9 @@ use C4::Reserves2; use C4::Circulation::Renewals2; use C4::Circulation::Circ2; use C4::Koha; +use C4::Database; + +my $dbh=C4Connect; my $input = new CGI; my $bornum=$input->param('bornum'); @@ -250,7 +253,7 @@ for (my $i=0;$i<$count;$i++){ $issue->[$i]{'barcode'} $issue->[$i]{'date_due'}"; #find the charge for an item - my ($charge,$itemtype)=calc_charges(undef,$issue->[$i]{'itemnumber'},$bornum); + my ($charge,$itemtype)=calc_charges(undef,$dbh,$issue->[$i]{'itemnumber'},$bornum); print "$itemtype"; print "$charge"; @@ -302,7 +305,7 @@ print <Requested -Charge + Remove @@ -318,14 +321,17 @@ my ($rescount,$reserves)=FindReserves('',$bornum); #From C4::Reserves2 # kind of loop? # for (my $i=0;$i<$rescount;$i++){ - $reserves->[$i]{'reservedate'} = slashifyDate($reserves->[$i]{'reservedate'}); - + $reserves->[$i]{'reservedate2'} = slashifyDate($reserves->[$i]{'reservedate'}); + my $restitle; + if ($reserves->[$i]{'constrainttype'} eq 'o'){ + $restitle=getreservetitle($reserves->[$i]{'biblionumber'},$reserves->[$i]{'borrowernumber'},$reserves->[$i]{'reservedate'},$reserves->[$i]{'timestamp'}); + } print " - [$i]{'biblionumber'}\">$reserves->[$i]{'btitle'} - $reserves->[$i]{'reservedate'} + [$i]{'biblionumber'}\">$reserves->[$i]{'btitle'} $restitle->{'volumeddesc'} $restitle->{'itemtype'} + $reserves->[$i]{'reservedate2'} [$i]{'biblionumber'}> - +