From 99f13f88d64b41eae511114e41899091058682fb Mon Sep 17 00:00:00 2001 From: finlayt Date: Fri, 29 Nov 2002 02:26:38 +0000 Subject: [PATCH] Fixed fines to date --- opac/opac-user.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/opac/opac-user.pl b/opac/opac-user.pl index d2aa48a8ea..481bb07dae 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -8,6 +8,7 @@ use C4::Koha; use C4::Circulation::Circ2; use C4::Circulation::Renewals2; use C4::Reserves2; +use C4::Search; my $query = new CGI; my ($template, $borrowernumber, $cookie) @@ -62,7 +63,15 @@ foreach my $key (keys %$issues) { if ($restype) { $issue->{'reserved'} = 1; } - my ($charges, $itemtype) = calc_charges(undef, undef, $issue->{'itemnumber'}, $borrowernumber); + + my ($numaccts,$accts,$total) = getboracctrecord(undef,$borr); + my $charges = 0; + foreach my $ac (@$accts) { + if ($ac->{'itemnumber'} == $issue->{'itemnumber'}) { + $charges += $ac->{'amountoutstanding'} if $ac->{'accounttype'} eq 'F'; + $charges += $ac->{'amountoutstanding'} if $ac->{'accounttype'} eq 'L'; + } + } $issue->{'charges'} = $charges; # get publictype for icon -- 2.39.5