Add the official number format for Switzerland ( 1'234'567.89 ) and make it selectable in system preferenc 'CurrencyFormat'.
Created attachment 52504 [details] [review] Bug 16768 - Add official number format for Switzerland: 1'234'567.89 This patch adds the official number format for Switzerland (CH) and makes it selectable in syspref 'CurrencyFormat' To test: - Apply patch - Set syspref 'CurrencyFormat' to '360'000.00 (CH)' - Go to Home > Administration > Budgets administration - Create or edit a budget with Total amount of 1234567.89 - Verify that the amount appears properly formated as 1'234'567.89
Created attachment 52505 [details] [review] Bug 16768: Add tests for Swiss number format Testplan: - Apply patch - Run t/Number/Price.t
Created attachment 52506 [details] [review] Bug 16768 - Add official number format for Switzerland: 1'234'567.89 This patch adds the official number format for Switzerland (CH) and makes it selectable in syspref 'CurrencyFormat' To test: - Apply patch - Set syspref 'CurrencyFormat' to '360'000.00 (CH)' - Go to Home > Administration > Budgets administration - Create or edit a budget with Total amount of 1234567.89 - Verify that the amount appears properly formated as 1'234'567.89 Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Created attachment 52507 [details] [review] Bug 16768: Add tests for Swiss number format Testplan: - Apply patch - Run t/Number/Price.t Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Marc, please update the systempreferences.options as well.
koha-tmpl/intranet-tmpl/prog/en/includes/format_price.inc should be updated.
And have a look at git grep CurrencyFormat acqui/addorderiso2709.pl C4/Biblio.pm
Created attachment 52519 [details] [review] Bug 16768: Update systempreferences.options (additional value CH) As of comment #5, adding file installer/data/mysql/atomicupdate/bug_Bug_16768_official_number_format_switzerland.sql
(In reply to Jonathan Druart from comment #7) > And have a look at > git grep CurrencyFormat acqui/addorderiso2709.pl C4/Biblio.pm Thanks for the hint! However, at both places the decimal separator '.' is replaced by a ',' for the French format. Swiss format uses '.', so no changes needed here.
Created attachment 52521 [details] [review] Bug 16768: (followup) Add Swiss format for datatables (format_price.inc) This patch adds CH price format to: koha-tmpl/intranet-tmpl/prog/en/includes/format_price.inc (as of comment #6)
Test plan for format_price.inc: - Go to Home: Administration: Budgets administration - Verify that numbers appear as appropriate.
Created attachment 52523 [details] [review] Bug 16768: Update systempreferences.options (additional value CH) As of comment #5, adding file installer/data/mysql/atomicupdate/bug_Bug_16768_official_number_format_switzerland.sql Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Created attachment 52524 [details] [review] Bug 16768: (followup) Add Swiss format for datatables (format_price.inc) This patch adds CH price format to: koha-tmpl/intranet-tmpl/prog/en/includes/format_price.inc (as of comment #6) Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Created attachment 52527 [details] [review] Bug 16768 - Add official number format for Switzerland: 1'234'567.89 This patch adds the official number format for Switzerland (CH) and makes it selectable in syspref 'CurrencyFormat' To test: - Apply patch - Set syspref 'CurrencyFormat' to '360'000.00 (CH)' - Go to Home > Administration > Budgets administration - Create or edit a budget with Total amount of 1234567.89 - Verify that the amount appears properly formated as 1'234'567.89 Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 52528 [details] [review] Bug 16768: Add tests for Swiss number format Testplan: - Apply patch - Run t/Number/Price.t Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 52529 [details] [review] Bug 16768: Update systempreferences.options (additional value CH) As of comment #5, adding file installer/data/mysql/atomicupdate/bug_Bug_16768_official_number_format_switzerland.sql Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 52530 [details] [review] Bug 16768: (followup) Add Swiss format for datatables (format_price.inc) This patch adds CH price format to: koha-tmpl/intranet-tmpl/prog/en/includes/format_price.inc (as of comment #6) Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 52531 [details] [review] Bug 16768: Update options in sysprefs.sql Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 16.11, thanks Marc, Jonathan!