Bug 12970

Summary: Refactor VAT and price calculation - basket page
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer, paola.rossi, pasi.kallinen, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 12969    
Bug Blocks: 12826    
Attachments: Bug 12970: Use the centralize VAT and prices calculation - basket.pl
Bug 12970: Format totals
Bug 12970: Cancelled orders
Bug 12970: Use the centralize VAT and prices calculation - basket.pl
Bug 12970: Format totals
Bug 12970: Cancelled orders
Bug 12970: Fix the footer if several tax rate exist
[PASSED QA] Bug 12970: Use the centralize VAT and prices calculation - basket.pl
[PASSED QA] Bug 12970: Format totals
[PASSED QA] Bug 12970: Cancelled orders
[PASSED QA] Bug 12970: Fix the footer if several tax rate exist

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.