Bug 12979 - Price formatting should only be defined at one place
Summary: Price formatting should only be defined at one place
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 12844
Blocks: 4078 13352
  Show dependency treegraph
 
Reported: 2014-09-23 10:01 UTC by Jonathan Druart
Modified: 2017-06-14 22:05 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 12979: Price formatting should only be defined at one place (20.13 KB, patch)
2014-09-23 10:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12979: Fix error on layout3pagesfr (1.84 KB, patch)
2014-09-30 07:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12979: Price formatting should only be defined at one place (20.72 KB, patch)
2014-09-30 14:15 UTC, Paola Rossi
Details | Diff | Splinter Review
Bug 12979: Fix error on layout3pagesfr (1.95 KB, patch)
2014-09-30 14:16 UTC, Paola Rossi
Details | Diff | Splinter Review
[PASSED QA] Bug 12979: Price formatting should only be defined at one place (20.25 KB, patch)
2014-10-22 06:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12979: Fix error on layout3pagesfr (2.01 KB, patch)
2014-10-22 06:38 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-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!