Summary: | Rounding error for fines total in C4::Members::GetMemberAccountRecords | ||
---|---|---|---|
Product: | Koha | Reporter: | D Ruth Holloway <ruth> |
Component: | Staff interface | Assignee: | D Ruth Holloway <ruth> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | minor | ||
Priority: | P4 | CC: | veron |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15741 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17140 |
||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | |||
Bug Blocks: | 18481, 18487 |
Description
Chris Cormack
2010-05-21 01:09:48 UTC
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); } |