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

            Bug ID: 43960
           Summary: Round account line amounts at write time per income
                    rounding preferences
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Fines and fees
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
        Depends on: 43957
            Blocks: 23728
  Target Milestone: ---

Round account line amounts at write time according to the income rounding
preferences. Part of the currency rounding work collected on bug 23728.

accountlines.amount is decimal(28,6), and nothing stops fractions of a penny
being stored (Koha::Account::add_debit, REST API, POS sales).

Proposed: a single hook in Koha::Account::Line->store that rounds amount and
amountoutstanding to the currency decimal_digits using IncomeRoundingMode, when
IncomeRoundingTiming is not none. Fines raised by the overdue rules are handled
in the fines bug.

Tests: debits and credits created through add_debit, add_credit and REST are
stored at 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
-- 
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