From bc14432d5f5f5e73edca19eb9df2d4d8ba8dc14f Mon Sep 17 00:00:00 2001 From: tipaul Date: Mon, 22 Dec 2003 10:41:22 +0000 Subject: [PATCH] fix for #537 : in borrower screen, the "fine & debts" now shows only amount due if >0, "nothing due" if borrower has no debts. --- .../default/en/members/moremember.tmpl | 30 ++++++---------- moremember.pl | 36 +------------------ 2 files changed, 12 insertions(+), 54 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl index cef1dac1d6..c58329c46c 100644 --- a/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl @@ -98,28 +98,20 @@ - + - - - - - - - - + + + + - - - + + + + + -
/images/background-mem.gif" colspan=4>FINES & CHARGES/images/background-mem.gif" colspan=2>FINES & CHARGES
- - &bib=&bi="> - -   - -
Total due
No debts
+


>View Account diff --git a/moremember.pl b/moremember.pl index b0da2bf56d..958e434695 100755 --- a/moremember.pl +++ b/moremember.pl @@ -123,41 +123,7 @@ $data->{'branchcode'} = &getbranchname($data->{'branchcode'}); # Converts the categorycode to the description $data->{'categorycode'} = &getborrowercategory($data->{'categorycode'}); -# FIXME -# it looks like $numaccts is a temp variable and that the -# for (my $i;$i<$numaccts;$i++) -# can be turned into a foreach loop instead -# my ($numaccts,$accts,$total)=getboracctrecord('',\%bor); -#if ($numaccts > 10){ -# $numaccts=10; -#} -my @accountdata; -for (my$i=0;$i<$numaccts;$i++){ - my $amount= $accts->[$i]{'amount'} + 0.00; - my $amount2= $accts->[$i]{'amountoutstanding'} + 0.00; - my %row = %$accts->[$i]; - if ($amount2 != 0){ - my $item="   "; - $row{'date'} = format_date($accts->[$i]{'date'}); - - if ($accts->[$i]{'accounttype'} ne 'Res'){ - #get item data - #$item= - } - - # FIXME - # why set this variable if it's not going to be used? - # - my $env; - if ($accts->[$i]{'accounttype'} ne 'Res'){ - my $iteminfo=C4::Circulation::Circ2::getiteminformation($env,$accts->[$i]->{'itemnumber'},''); - # FIXME, seems to me $iteminfo gets not defined - %row = (%row , %$iteminfo) if $iteminfo; - } - } - push (@accountdata, \%row); -} my ($count,$issue)=borrissues($bornum); my $today=ParseDate('today'); @@ -210,7 +176,7 @@ foreach my $reserveline (@$reserves) { $template->param($data); $template->param( bornum => $bornum, - accountloop => \@accountdata, + totaldue =>$total, issueloop => \@issuedata, reserveloop => \@reservedata); -- 2.39.5