[Koha-bugs] [Bug 18736] Problems in order calculations (rounding errors)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Aug 24 03:28:27 CEST 2018


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

--- Comment #81 from Nick Clemens <nick at bywatersolutions.com> ---
(In reply to Julian Maurice from comment #79)
> There are a few problems:
> - 'use C4::Acquisition' is missing in acqui/spent.pl

Fixed!

> - acqui/order.pl uses aqorders.ecost, which for me is already rounded in the
> database ('9.85'), so the amount doesn't change when I change the syspref
> value (it's like syspref is always "Round")
> - same for reports/orders_by_fund.pl

ecost is a 2 decimal precision number - beyond the scope here

> - In admin/aqbudgets.pl, the amount doesn't change when I change the syspref
> value (it's like syspref is always "Don't round")

Fixed

> - The result of get_rounded_price is often used in multiplication, but this
> is wrong because get_rounded_price use Koha::Number::Format and this can
> return strings that are not valid numbers (ex: "1,234.000")

I switched to round(), this should return numeric values

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


More information about the Koha-bugs mailing list