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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
        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.
_______________________________________________
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/

Reply via email to