Bug 22791

Summary: Calculation differs on aqui-home/spent and ordered.pl
Product: Koha Reporter: Nick Clemens <nick>
Component: AcquisitionsAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: bdaeuber, katrin.fischer, lucas, m.de.rooy, martin.renvoize
Version: master   
Hardware: All   
OS: All   
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
Bug Depends on: 18736    
Bug Blocks:    
Attachments: Bug 22791: Unify calculation between aqui-home and ordered.pl
Bug 22791: Unify calculation between aqui-home and ordered.pl
Bug 22791: Unify calculation between aqui-home and ordered.pl

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