[Bug 43961] New: POS accepts prices and quantities that produce fractions of a penny
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43961 Bug ID: 43961 Summary: POS accepts prices and quantities that produce fractions of a penny Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Point of Sale Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: martin.renvoize@openfifth.co.uk Depends on: 43957, 43958, 43960 Blocks: 23728 Target Milestone: --- POS accepts prices and quantities that produce fractions of a penny. Part of the currency rounding work collected on bug 23728. Koha::Charges::Sales::purchase stores amount = quantity x price unrounded. The price cell on pos/pay.tt accepts any text and add_item only checks that price is present. The debit type default_amount is validated only by a client-side pattern (admin/debit_types.pl stores it as given). Only whole currency units can change hands at a till, so POS should reject fractional results rather than round them: - add_item and the pay screen reject prices with more decimals than the currency allows, and non-integer quantities. - default_amount is validated server-side. - The grid total and "paid" value use the shared rounding helper so screen and server agree. Tests: 0.275 x 3 is rejected; 0.25 x 3 is stored as 0.75; no stored line exceeds currency precision. 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=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=43960 [Bug 43960] Round account line amounts at write time per income rounding preferences -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43961 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 210152 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210152&action=edit Bug 43961: POS accepts whole currency units only -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43961 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43961 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43963 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43963 [Bug 43963] Round fines when charged and retire the RoundFinesAtPayment tolerance -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43961 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|23728 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23728 [Bug 23728] [OMNIBUS] Currency precision and rounding: central engine, per-currency digits, configurable policy -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org