[Koha-cvs] CVS: koha moremember.pl,1.33,1.34

Paul POULAIN tipaul at users.sourceforge.net
Mon Dec 22 11:41:25 CET 2003


Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv13880

Modified Files:
	moremember.pl 
Log Message:
fix for #537 : in borrower screen, the "fine & debts" now shows only amount due if >0, "nothing due" if borrower has no debts.

Index: moremember.pl
===================================================================
RCS file: /cvsroot/koha/koha/moremember.pl,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** moremember.pl	1 Jul 2003 10:31:30 -0000	1.33
--- moremember.pl	22 Dec 2003 10:41:22 -0000	1.34
***************
*** 124,162 ****
  $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=" &nbsp; ";
- 		$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);
--- 124,128 ----
***************
*** 211,215 ****
  $template->param(
  		 bornum          => $bornum,
! 		 accountloop     => \@accountdata,
  		 issueloop       => \@issuedata,
  		 reserveloop     => \@reservedata);
--- 177,181 ----
  $template->param(
  		 bornum          => $bornum,
! 		 totaldue =>$total,
  		 issueloop       => \@issuedata,
  		 reserveloop     => \@reservedata);





More information about the Koha-cvs mailing list