https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43957 Bug ID: 43957 Summary: Add per-currency decimal digits and configurable rounding policy preferences Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Depends on: 43956 Blocks: 23728 Target Milestone: --- Add a decimal_digits setting to currencies and configurable rounding policy preferences. Part of the currency rounding work collected on bug 23728. Currently 2 decimal places are hard-coded (Koha::Number::Price::_format_params decimal_fill, format_price.inc toFixed(2)). The currency table has no digits column, although some currencies use 0 or 3 digits. Proposed: - currency.decimal_digits tinyint, default 2, editable in the currency administration page. - Koha::Number::Price and the JS formatter read the digits from the active currency. - New system preferences, shared digits but separate timing and mode for income (POS, cash management, fines, manual debits) and outgoings (acquisitions): - IncomeRoundingTiming: line (default) | total | none - IncomeRoundingMode: half_away_from_zero (default) | half_up | half_down | half_even | half_odd - OutgoingRoundingTiming and OutgoingRoundingMode, same options - OrderPriceRounding migrates to the outgoing preferences (nearest_cent maps to line timing at the currency digits; empty maps to none). - Vendor-level overrides are handled in the acquisitions bug. Needs an atomicupdate and DBIC schema update. Tests with a 0-digit and a 3-digit currency. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23728 [Bug 23728] Rounding code should be moved to a Koha module so code can be centralised https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43956 [Bug 43956] Koha::Number::Price::round returns wrong or inconsistent results -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.