]> git.koha-community.org Git - koha.git/commit
Bug 36049: Fix price rounding
authorRaphael Straub <raphael.straub@kit.edu>
Thu, 8 Feb 2024 14:17:56 +0000 (14:17 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 30 Sep 2024 14:22:40 +0000 (15:22 +0100)
commit56091d9660f215a894ff374b1e61e264ea471b52
tree56392d5fc27c5f73a90ce1b52e65044e2e73e85e
parent0ca0cd766a0622a3aed282e65d220c1ad48b676f
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@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Number/Price.pm