Bugzilla – Attachment 52527 Details for
Bug 16768
Add official number format for Switzerland: 1'234'567.89
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16768 - Add official number format for Switzerland: 1'234'567.89
Bug-16768---Add-official-number-format-for-Switzer.patch (text/plain), 2.29 KB, created by
Jonathan Druart
on 2016-06-19 10:44:30 UTC
(
hide
)
Description:
Bug 16768 - Add official number format for Switzerland: 1'234'567.89
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-06-19 10:44:30 UTC
Size:
2.29 KB
patch
obsolete
>From a10f3a42988ce13fe537b730b50d04450f54dd5e Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Sat, 18 Jun 2016 08:17:03 +0200 >Subject: [PATCH] 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> >--- > Koha/Number/Price.pm | 13 +++++++++++++ > .../prog/en/modules/admin/preferences/acquisitions.pref | 1 + > 2 files changed, 14 insertions(+) > >diff --git a/Koha/Number/Price.pm b/Koha/Number/Price.pm >index 331e3c3..21d9643 100644 >--- a/Koha/Number/Price.pm >+++ b/Koha/Number/Price.pm >@@ -105,6 +105,19 @@ sub _format_params { > ); > } > >+ if ( $currency_format eq 'CH' ) { >+ $int_curr_symbol = $currency->symbol if $with_symbol; >+ %format_params = ( >+ decimal_fill => '2', >+ decimal_point => '.', >+ int_curr_symbol => $int_curr_symbol, >+ mon_thousands_sep => '\'', >+ thousands_sep => '\'', >+ mon_decimal_point => '.' >+ ); >+ } >+ >+ > $format_params{p_cs_precedes} = $p_cs_precedes if defined $p_cs_precedes; > $format_params{p_sep_by_space} = ( $int_curr_symbol and defined $p_sep_by_space ) ? $p_sep_by_space : 0; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >index 0c924b4..26ec49a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >@@ -32,6 +32,7 @@ Acquisitions: > choices: > US: 360,000.00 (US) > FR: 360 000,00 (FR) >+ CH: 360'000.00 (CH) > - > - Tax rates are > - pref: gist >-- >2.8.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16768
:
52504
|
52505
|
52506
|
52507
|
52519
|
52521
|
52523
|
52524
| 52527 |
52528
|
52529
|
52530
|
52531