[Koha-bugs] [Bug 36049] Rounding prices sometimes leads to incorrect results

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Mar 3 03:07:35 CET 2024


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

Victor Grousset/tuxayo <victor at tuxayo.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #162700|0                           |1
        is obsolete|                            |

--- Comment #10 from Victor Grousset/tuxayo <victor at tuxayo.net> ---
Created attachment 162701
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162701&action=edit
Bug 36049: Fix price rounding

This patch only fixes price rounding by using Math::BigFloat.

To test:
0) Enable syspref OrderPriceRounding
1) Create an order line in acquisitions with vendor price 18.90 and a
   discount of 5 %.
2) Verify that the total (tax excl.) in the order table on the basket
   page is 17.95.
3) Apply the patch.
4) Reload the basket page.
5) Verify that the total (tax excl.) in the order table on the basket
   page now is 17.96, which is correct.
6) Run: prove t/Number/Price.t

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: David Nind <david at davidnind.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list