Bug 12979

Summary: Price formatting should only be defined at one place
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: normal    
Priority: P5 - low CC: katrin.fischer, paola.rossi, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
Bug Depends on: 12844    
Bug Blocks: 4078, 13352    
Attachments: Bug 12979: Price formatting should only be defined at one place
Bug 12979: Fix error on layout3pagesfr
Bug 12979: Price formatting should only be defined at one place
Bug 12979: Fix error on layout3pagesfr
[PASSED QA] Bug 12979: Price formatting should only be defined at one place
[PASSED QA] Bug 12979: Fix error on layout3pagesfr

Description Jonathan Druart 2014-09-23 10:01:47 UTC
git grep Number::Format will show you the places where the currency format is defined.
This formatting should only be defined in the new module Koha::Number::Price.
Comment 1 Jonathan Druart 2014-09-23 10:05:24 UTC Comment hidden (obsolete)
Comment 2 Paola Rossi 2014-09-29 16:08:54 UTC
I've applied the patch against 3.17.00.025

On the 3-rd page FR, I saw:

Prix Koha::Number::Price=HASH(0x743ecd8)
Prix net: Koha::Number::Price=HASH(0x743ed08)
%Remise: Koha::Number::Price=HASH(0x743ed68)%
Remise: Koha::Number::Price=HASH(0x743edb0)

So I pass the patch to "Failed QA" status.
Comment 3 Jonathan Druart 2014-09-30 07:28:39 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2014-09-30 07:29:12 UTC
Good catch Paola!
Stupid error, it is fixed in the last patch.
Comment 5 Paola Rossi 2014-09-30 14:15:54 UTC Comment hidden (obsolete)
Comment 6 Paola Rossi 2014-09-30 14:16:34 UTC Comment hidden (obsolete)
Comment 7 Katrin Fischer 2014-10-22 06:38:08 UTC
Created attachment 32574 [details] [review]
[PASSED QA] Bug 12979: Price formatting should only be defined at one place

There are some places where the price format is defined.
All these occurrences should be removed use the way introduced by bug
12844.

Test plan:
1/ Verify you don't see any price formatting change on the basketgroup pdf
(for layout2pages, payout2pagesde, layout3pages and layout3pagesfr).
2/ On admin/aqbudgetperiods.pl, the budget total should be unchanged
too.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2014-10-22 06:38:20 UTC
Created attachment 32575 [details] [review]
[PASSED QA] Bug 12979: Fix error on layout3pagesfr

The format method was not called.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
No regressions found, passes tests and QA script.
Comment 9 Tomás Cohen Arazi 2014-11-07 18:21:51 UTC
Patches pushed to master.

Thanks Jonathan!