[Koha-bugs] [Bug 15741] Incorrect rounding in total fines calculations
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Mar 14 11:25:39 CET 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15741
--- Comment #5 from sandboxes at biblibre.com <sandboxes at biblibre.com> ---
Created attachment 49087
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49087&action=edit
Bug 15741: Fix rounding in total fines calculations
C4::Members::GetMemberAccountRecords wrongly casts float to integer
It's common to use sprintf in Perl to do this job.
% perl -e 'print int(1000*64.60)."\n"';
64599
% perl -e 'print sprintf("%.0f", 1000*64.60)."\n"';
64600
Test plan:
1) Create manual invoice for 64.60 (or 1.14, 1.36, ...)
2) Try to pay it using "Pay amount" or "Pay selected" buttons
Signed-off-by: Sally Healey <sally.healey at cheshiresharedservices.gov.uk>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list