Bug 22791 - Calculation differs on aqui-home/spent and ordered.pl
Summary: Calculation differs on aqui-home/spent and ordered.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on: 18736
Blocks:
  Show dependency treegraph
 
Reported: 2019-04-26 19:57 UTC by Nick Clemens
Modified: 2020-06-04 20:32 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05.00, 18.11.06


Attachments
Bug 22791: Unify calculation between aqui-home and ordered.pl (1.09 KB, patch)
2019-04-26 19:59 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 22791: Unify calculation between aqui-home and ordered.pl (1.14 KB, patch)
2019-05-03 19:42 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 22791: Unify calculation between aqui-home and ordered.pl (1.20 KB, patch)
2019-05-07 08:19 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2019-04-26 19:57:44 UTC
Order an example with 8 * 16,99 and 42% discount, 19.45% tax.

Ordered.pl is doing: get_rounded_price( quantity * price )

Other pages are: quantity * get_rounded_price( price )

The second is more correct I believe
Comment 1 Nick Clemens 2019-04-26 19:59:55 UTC
Created attachment 88968 [details] [review]
Bug 22791: Unify calculation between aqui-home and ordered.pl

To test:
1 - Enable order price rounding
2 - Order an example with 8 * 16,99 and 42% discount, 19.45% tax.
3 - Check ordered page - 94.17 is total
4 - Check aqui-home - 94.16 is total
5 - Apply patch
6 - Verify numbers now match
Comment 2 Marcel de Rooy 2019-04-30 13:48:16 UTC
Thought we resolved these numbers :)
Comment 3 Nick Clemens 2019-04-30 13:52:07 UTC
(In reply to Marcel de Rooy from comment #2)
> Thought we resolved these numbers :)

Baby steps
Comment 4 Maryse Simard 2019-05-03 19:42:07 UTC
Created attachment 89327 [details] [review]
Bug 22791: Unify calculation between aqui-home and ordered.pl

To test:
1 - Enable order price rounding
2 - Order an example with 8 * 16,99 and 42% discount, 19.45% tax.
3 - Check ordered page - 94.17 is total
4 - Check aqui-home - 94.16 is total
5 - Apply patch
6 - Verify numbers now match

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 5 Katrin Fischer 2019-05-07 08:19:23 UTC
Created attachment 89422 [details] [review]
Bug 22791: Unify calculation between aqui-home and ordered.pl

To test:
1 - Enable order price rounding
2 - Order an example with 8 * 16,99 and 42% discount, 19.45% tax.
3 - Check ordered page - 94.17 is total
4 - Check aqui-home - 94.16 is total
5 - Apply patch
6 - Verify numbers now match

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Nick Clemens 2019-05-07 12:01:59 UTC
Awesome work all!

Pushed to master for 19.05
Comment 7 Martin Renvoize 2019-05-08 15:46:44 UTC
Pushed to 18.11.x for 18.11.06
Comment 8 Lucas Gass 2019-05-30 14:23:15 UTC
missing dependencies for 18.05.x, no backport