https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23728
Martin Renvoize (ashimema) <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |43956 Depends on| |43957 Depends on| |43958 Depends on| |43959 Depends on| |43960 Depends on| |43961 Depends on| |43962 Depends on| |43963 Depends on| |43964 Summary|Rounding code should be |[OMNIBUS] Currency |moved to a Koha module so |precision and rounding: |code can be centralised |central engine, | |per-currency digits, | |configurable policy Depends on| |24655, 27054, 35114, 37937, | |37938, 41708, 43290 --- Comment #1 from Martin Renvoize (ashimema) <[email protected]> --- Turning this into the collector for all currency rounding and precision work. Problem: rounding is implemented several ways (Koha::Number::Price::round via BigFloat half-even, Number::Format in ::format, toFixed in format_price.inc, CAST(x*100 AS SIGNED) in acquisitions SQL, a under-a-cent tolerance in RoundFinesAtPayment). They disagree, hard-code 2 decimals, and let sub-penny values reach accountlines (decimal 28,6). A POS sale stored as -0.825 caused false cash-up discrepancies. Design: income and outgoings share the currency's digits and differ only in rounding timing (line / total / none) and rounding mode (half_away_from_zero default, half_up, half_down, half_even, half_odd). Outgoings can be overridden per vendor, falling back to system preferences. Only whole units can change hands, so POS rejects fractional results instead of rounding them. Intended order: 1. Bug 43956 - fix and unify Koha::Number::Price (foundation) 2. Bug 43957 - currency decimal_digits and rounding preferences 3. Bug 43958 - shared JS currency helper 4. Bug 43959 - cash-up compares in minor units 5. Bug 43960 - write-time rounding of account lines 6. Bug 43961 - POS full units only 7. Bug 43962 - acquisitions on the shared engine, vendor override 8. Bug 43963 - fines (also covers 27054 and 24655) 9. Bug 43964 - optional maintenance script Existing rounding bugs now depend-linked here: 17140, 24655, 27054, 35114, 37937, 37938, 41708, 43290. Related (decimal separators / fractions, not rounding policy): 21507, 12310, 18186, 17098, 41500. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24655 [Bug 24655] RoundFinesAtPayment can leave partial cent credits on patrons account https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27054 [Bug 27054] Round fines at charging https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35114 [Bug 35114] Calculation around basket details and basketgroup not correct https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37937 [Bug 37937] Budgeted cost tax exc. in basket page isn't honoring OrderPriceRounding https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37938 [Bug 37938] Budgeted cost in new order form isn't honoring OrderPriceRounding https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41708 [Bug 41708] Actual costs on Receiving isn't honoring OrderPriceRounding https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43290 [Bug 43290] Cashup summary totals can carry excess decimal precision https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43956 [Bug 43956] Koha::Number::Price::round returns wrong or inconsistent results https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43957 [Bug 43957] Add per-currency decimal digits and configurable rounding policy preferences https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43958 [Bug 43958] Replace toFixed-based price formatting with a currency-aware minor-unit helper https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43959 [Bug 43959] Cash-up reports false surplus or deficit when amounts contain fractions of a penny https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43960 [Bug 43960] Round account line amounts at write time per income rounding preferences https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43961 [Bug 43961] POS accepts prices and quantities that produce fractions of a penny https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43962 [Bug 43962] Use the shared rounding engine in acquisitions with per-vendor rounding settings https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43963 [Bug 43963] Round fines when charged and retire the RoundFinesAtPayment tolerance https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43964 [Bug 43964] Maintenance script to find and optionally fix account lines with excess decimal places -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
