[Koha-bugs] [Bug 3379] Rounding error for fines total in C4::Members::GetMemberAccountRecords
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sat Apr 13 19:12:36 CEST 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3379
Katrin Fischer <katrin.fischer at bsz-bw.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |katrin.fischer at bsz-bw.de
Version|master |unspecified
Resolution|--- |FIXED
--- Comment #1 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
The first suggestion for fixing this problem has been implemented:
my $total = 0;
while ( my $data = $sth->fetchrow_hashref ) {
if ( $data->{itemnumber} ) {
my $biblio = GetBiblioFromItemNumber( $data->{itemnumber} );
$data->{biblionumber} = $biblio->{biblionumber};
$data->{title} = $biblio->{title};
}
$acctlines[$numlines] = $data;
$numlines++;
$total += int(1000 * $data->{'amountoutstanding'}); # convert float to
integer to avoid round-off errors
}
$total /= 1000;
return ( $total, \@acctlines,$numlines);
}
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list