Bug 12970 - Refactor VAT and price calculation - basket page
Summary: Refactor VAT and price calculation - basket page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
: 12128 (view as bug list)
Depends on: 12969
Blocks: 12826
  Show dependency treegraph
 
Reported: 2014-09-19 15:17 UTC by Jonathan Druart
Modified: 2015-12-03 22:11 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 12970: Use the centralize VAT and prices calculation - basket.pl (8.93 KB, patch)
2014-09-19 15:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12970: Format totals (2.23 KB, patch)
2014-09-25 14:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12970: Cancelled orders (2.85 KB, patch)
2014-09-25 14:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12970: Use the centralize VAT and prices calculation - basket.pl (9.15 KB, patch)
2014-09-30 15:58 UTC, Paola Rossi
Details | Diff | Splinter Review
Bug 12970: Format totals (2.34 KB, patch)
2014-09-30 16:00 UTC, Paola Rossi
Details | Diff | Splinter Review
Bug 12970: Cancelled orders (2.97 KB, patch)
2014-09-30 16:00 UTC, Paola Rossi
Details | Diff | Splinter Review
Bug 12970: Fix the footer if several tax rate exist (1.41 KB, patch)
2014-11-14 14:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PASSED QA] Bug 12970: Use the centralize VAT and prices calculation - basket.pl (9.05 KB, patch)
2015-01-05 22:48 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12970: Format totals (2.35 KB, patch)
2015-01-05 22:48 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12970: Cancelled orders (2.97 KB, patch)
2015-01-05 22:48 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12970: Fix the footer if several tax rate exist (1.48 KB, patch)
2015-01-05 22:49 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 Jonathan Druart 2014-09-19 15:17:16 UTC
Bug 12969 introduces a subroutine to centralize the VAT and price calculation.
The basket page should use it.
Comment 1 Jonathan Druart 2014-09-19 15:30:54 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2014-09-25 14:33:44 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2014-09-25 14:43:15 UTC Comment hidden (obsolete)
Comment 4 Paola Rossi 2014-09-30 15:58:22 UTC Comment hidden (obsolete)
Comment 5 Paola Rossi 2014-09-30 16:00:00 UTC Comment hidden (obsolete)
Comment 6 Paola Rossi 2014-09-30 16:00:27 UTC Comment hidden (obsolete)
Comment 7 Katrin Fischer 2014-10-28 22:29:29 UTC
Blocked by bug 12896 currently not applying. :(
Comment 8 Katrin Fischer 2014-11-09 17:57:37 UTC
*** Bug 12128 has been marked as a duplicate of this bug. ***
Comment 9 Jonathan Druart 2014-11-14 14:45:44 UTC Comment hidden (obsolete)
Comment 10 Katrin Fischer 2015-01-05 22:48:51 UTC
Created attachment 34964 [details] [review]
[PASSED QA] Bug 12970: Use the centralize VAT and prices calculation - basket.pl

Bug 12969 introduces a subroutine to centralize VAT and prices
calculation.
It should be use in the acqui/basket.pl script.

Test plan:
0/ Don't apply the patch
1/ Create 4 suppliers with the different configurations
2/ Create a basket and create several orders
3/ Go on the basket page
4/ Apply the patch
5/ Verify you don't see any difference before and after applying the
patch

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2015-01-05 22:48:55 UTC
Created attachment 34965 [details] [review]
[PASSED QA] Bug 12970: Format totals

The total values should be formated too.

Test plan:
1/ Go on the basket page
2/ Using the CurrencyFormat, verify the totals are correctly formated.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2015-01-05 22:48:58 UTC
Created attachment 34966 [details] [review]
[PASSED QA] Bug 12970: Cancelled orders

Previous patch does modify the code for cancelled orders.

Test plan:
Cancel 1+ orders and verify the prices are correct (i.e. the same as
the non-cancelled orders) and that the prices are formated.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2015-01-05 22:49:01 UTC
Created attachment 34967 [details] [review]
[PASSED QA] Bug 12970: Fix the footer if several tax rate exist

If more that 1 tax rate exist, 1 total ligne should be display in the
footer.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 14 Tomás Cohen Arazi 2015-01-08 00:03:53 UTC
Patches pushed to master.

Thanks Jonathan!
Comment 15 Jonathan Druart 2015-02-19 09:20:54 UTC
Tomas, this is *not* in master yet.
Comment 16 Tomás Cohen Arazi 2015-02-19 13:12:01 UTC
I'm sorry Jonathan. It is now pushed. I might have messed up some of my working branches at s
ome point.