[Bug 37511] New: Location of the currency symbol (before or *after*) the amount
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Bug ID: 37511 Summary: Location of the currency symbol (before or *after*) the amount Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org It is customary in non-English-speaking European countries to write the currency symbol after the amount and separated from it by a space (e.g. 123 €, 54 zł, 38 Kč). This custom should be taken into account in Koha::Number::Price::_format_params (by adding the p_cs_precedes parameter). This parameter could either be directly associated with the use of spaces (p_sep_by_space), or given as a separate data when configuring the currency. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20352 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 172264 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172264&action=edit Bug 37511: DB changes -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #2 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 172265 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172265&action=edit Bug 37511: DBIC schema changes for bug 37511 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #3 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 172266 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172266&action=edit Bug 37511: Location of the currency symbol (before or *after*) the amount It is customary in non-English-speaking European countries to write the currency symbol after the amount and separated from it by a space (e.g. 123 €, 54 zł, 38 Kč). This custom should be taken into account in Koha::Number::Price::_format_params (by proper use the p_cs_precedes parameter). The correct display of the currency is particularly important when using OPACShowSavings system preference. Test plan: ========== 1. Enable OPACShowSavings, have some items with defined 'v - Cost, replacement price'. Check out the items to a patron. 2. Log in to OPAC as the patron. See the amount of 'total savings' on the main page. Note that the currency symbol precedes the amount. There is no way to configure the position of the currency symbol. 3. Apply the patch ; updatedatabase.pl ; restart_all. 4. Go to Administration > Currencies and exchange rates. Modify the active currency unchecking the 'Currency symbol precedes value' checkbox. 5. Refresh the OPAC page. See that the position of the currency symbol has been changed. Sponsored-by: Ignatianum University in Cracow -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #4 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 172267 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172267&action=edit Bug 37511: Unit tests -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |januszop@gmail.com |ity.org | Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172264|0 |1 is obsolete| | Attachment #172265|0 |1 is obsolete| | Attachment #172266|0 |1 is obsolete| | Attachment #172267|0 |1 is obsolete| | --- Comment #5 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 172286 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172286&action=edit Bug 37511: DB changes Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #6 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 172287 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172287&action=edit Bug 37511: DBIC schema changes for bug 37511 Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #7 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 172288 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172288&action=edit Bug 37511: Location of the currency symbol (before or *after*) the amount It is customary in non-English-speaking European countries to write the currency symbol after the amount and separated from it by a space (e.g. 123 €, 54 zł, 38 Kč). This custom should be taken into account in Koha::Number::Price::_format_params (by proper use the p_cs_precedes parameter). The correct display of the currency is particularly important when using OPACShowSavings system preference. Test plan: ========== 1. Enable OPACShowSavings, have some items with defined 'v - Cost, replacement price'. Check out the items to a patron. 2. Log in to OPAC as the patron. See the amount of 'total savings' on the main page. Note that the currency symbol precedes the amount. There is no way to configure the position of the currency symbol. 3. Apply the patch ; updatedatabase.pl ; restart_all. 4. Go to Administration > Currencies and exchange rates. Modify the active currency unchecking the 'Currency symbol precedes value' checkbox. 5. Refresh the OPAC page. See that the position of the currency symbol has been changed. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #8 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 172289 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172289&action=edit Bug 37511: Unit tests Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172286|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 173551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173551&action=edit Bug 37511: DB changes Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172287|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 173552 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173552&action=edit Bug 37511: DBIC schema changes for bug 37511 Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172288|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 173553 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173553&action=edit Bug 37511: Location of the currency symbol (before or *after*) the amount It is customary in non-English-speaking European countries to write the currency symbol after the amount and separated from it by a space (e.g. 123 €, 54 zł, 38 Kč). This custom should be taken into account in Koha::Number::Price::_format_params (by proper use the p_cs_precedes parameter). The correct display of the currency is particularly important when using OPACShowSavings system preference. Test plan: ========== 1. Enable OPACShowSavings, have some items with defined 'v - Cost, replacement price'. Check out the items to a patron. 2. Log in to OPAC as the patron. See the amount of 'total savings' on the main page. Note that the currency symbol precedes the amount. There is no way to configure the position of the currency symbol. 3. Apply the patch ; updatedatabase.pl ; restart_all. 4. Go to Administration > Currencies and exchange rates. Modify the active currency unchecking the 'Currency symbol precedes value' checkbox. 5. Refresh the OPAC page. See that the position of the currency symbol has been changed. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172289|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 173554 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173554&action=edit Bug 37511: Unit tests Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #13 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 173555 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173555&action=edit Bug 37511: (QA follow-up) Add boolean hint Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |Main --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 1) Database update Please use FIRST/AFTER to make sure the column ends in the same spot as defined by kohastructure.sql. Fixed on push. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Location of the currency |Add option to place the |symbol (before or *after*) |currency symbol before or |the amount |after the amount -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 20352 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Something here is not quite right, please check: I was trying to clean up the DBIC schema update I missed and I get this: data_type: 'tinyint' default_value: 1 - is_nullable: 0 + is_nullable: 1 =cut @@ -103,7 +103,7 @@ __PACKAGE__->add_columns( "p_sep_by_space", { data_type => "tinyint", default_value => 0, is_nullable => 1 }, "p_cs_precedes", - { data_type => "tinyint", default_value => 1, is_nullable => 0 }, + { data_type => "tinyint", default_value => 1, is_nullable => 1 }, The second patch here set is_nullable: 0, now the dbic run after running the database update sets is_nullable: 1. Something is not in sync. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #18 from Jonathan Druart <jonathan.druart@gmail.com> --- We should not try catch without rethrow. Please adjust the db rev: Simply remove the try-catch block. See bug 37895 for more details. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #19 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Jonathan Druart from comment #18)
We should not try catch without rethrow. Please adjust the db rev: Simply remove the try-catch block.
See bug 37895 for more details.
See bug 38394. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #20 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Katrin Fischer from comment #17)
Something here is not quite right, please check:
I was trying to clean up the DBIC schema update I missed and I get this:
data_type: 'tinyint' default_value: 1 - is_nullable: 0 + is_nullable: 1
=cut
@@ -103,7 +103,7 @@ __PACKAGE__->add_columns( "p_sep_by_space", { data_type => "tinyint", default_value => 0, is_nullable => 1 }, "p_cs_precedes", - { data_type => "tinyint", default_value => 1, is_nullable => 0 }, + { data_type => "tinyint", default_value => 1, is_nullable => 1 },
The second patch here set is_nullable: 0, now the dbic run after running the database update sets is_nullable: 1. Something is not in sync.
ping? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #21 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Janusz or Martin please? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #22 from Janusz Kaczmarek <januszop@gmail.com> --- (In reply to Jonathan Druart from comment #19)
(In reply to Jonathan Druart from comment #18)
We should not try catch without rethrow. Please adjust the db rev: Simply remove the try-catch block.
See bug 37895 for more details.
See bug 38394.
I'm sorry but I got a little bit lost. The whole patch (with its db rev. = 240600053.pl) is already in main since 30th October. If I trace it correctly you have corrected the aforesaid db rev. (by removing try/catch) with Bug 38394. Is there anything that I could/should do? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #23 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Janusz, to explain a bit more: In your DBIC schema changes file, that I dropped when pushing (as we usually do), you have is_nullable = 0 (second patch) But when I regenerated the DBIC file running dbic after the database update, it came out with is_nullable = 1 So: which one is correct? If we want is_nullable = 0, we will probably need another database update and kohastructure.sql change. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #24 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Janusz Kaczmarek from comment #22)
(In reply to Jonathan Druart from comment #19)
(In reply to Jonathan Druart from comment #18)
We should not try catch without rethrow. Please adjust the db rev: Simply remove the try-catch block.
See bug 37895 for more details.
See bug 38394.
I'm sorry but I got a little bit lost. The whole patch (with its db rev. = 240600053.pl) is already in main since 30th October. If I trace it correctly you have corrected the aforesaid db rev. (by removing try/catch) with Bug 38394. Is there anything that I could/should do?
You don't need to fix the dbrev for the try/catch yourself - we took care of it yesterday already. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |Adds the option in release notes| |currencies to define | |whether the currency symbol | |should appear before or | |after the amount in | |displays. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 --- Comment #25 from Janusz Kaczmarek <januszop@gmail.com> --- (In reply to Katrin Fischer from comment #23)
Hi Janusz,
to explain a bit more:
In your DBIC schema changes file, that I dropped when pushing (as we usually do), you have is_nullable = 0 (second patch)
But when I regenerated the DBIC file running dbic after the database update, it came out with is_nullable = 1
So: which one is correct? If we want is_nullable = 0, we will probably need another database update and kohastructure.sql change.
Thank you for your explanation, Katrin. I have tried to retrace the process of preparing of my original schema changes and this time I got is_nullable = 1. No idea why in the original patch it was = 0... And I am pretty sure I did not correct the schema file by hand. As it is now (is_nullable = 1) seems totally correct and coherent with the table description in mysql. I am sorry for the confusion. And thank you for your patience. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #26 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Questions resolved, removing keyword :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Architecture, internals, |Acquisitions |and plumbing | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to main |Needs documenting --- Comment #27 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Enhancement, no 24.05.x backport. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37511 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Documentation| |Caroline Cyr La Rose contact| | Resolution|--- |FIXED CC| |caroline.cyr-la-rose@inlibr | |o.com Status|Needs documenting |RESOLVED Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/1067 --- Comment #28 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Added to the manual. As a note, here in Canada, this is a language issue, not a currency issue. The same currency is displayed with the symbol before in English and the symbol after in French. -> https://www.noslangues-ourlanguages.gc.ca/en/writing-tips-plus/american-doll... -> https://www.noslangues-ourlanguages.gc.ca/en/writing-tips-plus/canadian-doll... I haven't tried how this behaves with the different translations, yet. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org