Bug 16768: (followup) Add Swiss format for datatables (format_price.inc)
authorMarc Véron <veron@veron.ch>
Sat, 18 Jun 2016 14:38:39 +0000 (16:38 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 24 Jun 2016 14:00:03 +0000 (14:00 +0000)
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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/format_price.inc

index b0e5a8d..2bc052b 100644 (file)
@@ -7,12 +7,19 @@
             decimal_point: ',',
             decimal_digits: 2
         };
+    [% ELSIF Koha.Preference("CurrencyFormat") == 'CH' %]
+        var default_value = {
+            thousands_sep: '\'',
+            decimal_point: '.',
+            decimal_digits: 2
+        };
     [% ELSE %]
         var default_value = {
             thousands_sep: ',',
             decimal_point: '.',
             decimal_digits: 2
         };
+
     [% END %]
     Number.prototype.format_price = function( value, params ) {
         params = params == undefined ? {} : params;