[Koha-bugs] [Bug 16202] Rental fees can be generated for fractions of a penny/cent

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 5 15:20:30 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16202

--- Comment #2 from M. Tompsett <mtompset at hotmail.com> ---
Comment on attachment 49907
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49907
Proposed Patch

Review of attachment 49907:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=16202&attachment=49907)
-----------------------------------------------------------------

::: C4/Circulation.pm
@@ +3209,5 @@
>              my $discount = _get_discount_from_rule($discount_rules, $branch, $item_type);
>              $charge = ( $charge * ( 100 - $discount ) ) / 100;
>          }
> +        if ($charge) {
> +            $charge = sprintf '%.2f', $charge; # ensure no fractions of a penny returned

This is not identical to the %.02f from line 984 before. Please add the 0 back.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list