[Bug 3379] Rounding error for fines total in C4::Members::GetMemberAccountRecords
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3379 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |katrin.fischer@bsz-bw.de Version|master |unspecified Resolution|--- |FIXED --- Comment #1 from Katrin Fischer <katrin.fischer@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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org