https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35114
Thibaud Guillot <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #157495|0 |1 is obsolete| | --- Comment #6 from Thibaud Guillot <[email protected]> --- Created attachment 161066 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161066&action=edit Bug 35114: Fix calculation around basketgroup and basket details Currently calculation on basketgroup is performed on ecost (tax_included and tax_excluded) while in basket detail it's on ecost only if unitprice is not defined. So I keep the same logic in basketgroup and I took the opportunity to remove a call to get_rounded_price on quantity (not logic). Test plan: 1) To test it you must have some items with differents values on ecost_tax_* and unitprice_tax_*. Both have 6 decimal places, but problems arise when the value (calculated for ecost_tax_*) has a 3rd decimal greater than or equal to 5. So I you have already this case in your datas create a basket with this item otherwise you can modify your database to reproduce the bad behavior. e.g set a ecost_tax_included to '18.655000' and '18.650000' for unitprice. 2) After the basket has been created, and in a basketgroup, go to basketgroup and check the amount. Click to see the details of the linked basket, the total will be different because the rounded total displayed previously (basketgroup) is based on the ecost_tax_* and so 18.655000 will become 18.66. In the detail based on the unitprice, which is 18.650000, the difference will be one cent on the total. Not much, but it's only a record... it's not precise (in accounting terms). 3) Apply this patch and repeat step 2) -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
