View | Details | Raw Unified | Return to bug 4078
Collapse All | Expand All

(-)a/Koha/Number/Price.pm (-14 / +57 lines)
Lines 79-85 sub round { Link Here
79
79
80
sub _format_params {
80
sub _format_params {
81
    my ( $self, $params ) = @_;
81
    my ( $self, $params ) = @_;
82
    my $with_symbol = $params->{with_symbol} || 0;
82
    my $with_symbol = $params->{with_symbol};
83
    my $p_cs_precedes = $params->{p_cs_precedes};
83
    my $p_cs_precedes = $params->{p_cs_precedes};
84
    my $p_sep_by_space = $params->{p_sep_by_space};
84
    my $p_sep_by_space = $params->{p_sep_by_space};
85
    my $currency        = GetCurrency();
85
    my $currency        = GetCurrency();
Lines 92-112 sub _format_params { Link Here
92
        mon_decimal_point => '.'
92
        mon_decimal_point => '.'
93
    );
93
    );
94
94
95
    if ( $currency_format eq 'FR' ) {
95
    if ( $currency_format =~ m/(_LEAD)/ ) {
96
        # FIXME This test should be done for all currencies
96
        $p_cs_precedes = 1 unless ( defined $p_cs_precedes );
97
        $int_curr_symbol = $currency->{symbol} if $with_symbol;
97
    }
98
        %format_params = (
98
99
            decimal_fill      => '2',
99
    if ( $currency_format =~ m/(_TRAIL)/ ) {
100
            decimal_point     => ',',
100
        $p_cs_precedes = 0 unless ( defined $p_cs_precedes );
101
            int_curr_symbol   => $int_curr_symbol,
101
    }
102
            mon_thousands_sep => ' ',
102
103
            thousands_sep     => ' ',
103
    $format_params{'p_cs_precedes'} = $p_cs_precedes
104
            mon_decimal_point => ','
104
        if ( defined $p_cs_precedes );
105
        );
105
106
    if ( $currency_format =~ m/(_SPACE)/ ) {
107
        $p_sep_by_space = 1 unless ( $p_sep_by_space );
108
    }
109
    else {
110
        $p_sep_by_space = 0 unless ( $p_sep_by_space );
111
    }
112
113
    $format_params{'p_sep_by_space'} = $p_sep_by_space;
114
115
    if ( $currency_format =~ m/(SYMB)/ ) {
116
        $with_symbol = 1 unless ( defined $with_symbol );
117
    }
118
119
    $format_params{'int_curr_symbol'} = $currency->{symbol}
120
       if ( $with_symbol );
121
122
   # $format_params{'int_curr_symbol'} = "xxxxxxxxxxxxxx";
123
124
    # TODO Add more currency formats (Syspref CurrencyFormat)
125
126
    # syspref FR: 360 000,00
127
    if ( $currency_format =~ m/(^FR)/ ) {
128
        $format_params{'decimal_fill'}      = '2';
129
        $format_params{'decimal_point'}     = ',';
130
        $format_params{'mon_decimal_point'} = ',';
131
        $format_params{'thousands_sep'}     = ' ';
132
        $format_params{'mon_thousands_sep'} = ' ';
133
    }
134
135
    # syspref US: 360,000.00
136
    if ( $currency_format =~ m/(^US)/ ) {
137
        $format_params{'decimal_fill'}      = '2';
138
        $format_params{'decimal_point'}     = '.';
139
        $format_params{'mon_decimal_point'} = '.';
140
        $format_params{'thousands_sep'}     = ',';
141
        $format_params{'mon_thousands_sep'} = ',';
142
    }
143
144
    # syspref CH: 360'000.00
145
    if ( $currency_format =~ m/(^CH)/ ) {
146
        $format_params{'decimal_fill'}      = '2';
147
        $format_params{'decimal_point'}     = '.';
148
        $format_params{'mon_decimal_point'} = '.';
149
        $format_params{'thousands_sep'}     = '\'';
150
        $format_params{'mon_thousands_sep'} = '\'';
106
    }
151
    }
107
152
108
    $format_params{p_cs_precedes}  = $p_cs_precedes  if defined $p_cs_precedes;
109
    $format_params{p_sep_by_space} = ( $int_curr_symbol and defined $p_sep_by_space ) ? $p_sep_by_space : 0;
110
153
111
    return \%format_params;
154
    return \%format_params;
112
}
155
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref (-3 / +16 lines)
Lines 27-37 Acquisitions: Link Here
27
                  branch: from staff member's library.
27
                  branch: from staff member's library.
28
                  all: in system, regardless of owner.
28
                  all: in system, regardless of owner.
29
        -
29
        -
30
            - Display currencies using the following format
30
            - "Display currencies using the following format (¤ = symbol of active currency as defined in <a href='/cgi-bin/koha/admin/currency.pl'>Currency and exchange rates</a>.)" 
31
            - pref: CurrencyFormat
31
            - pref: CurrencyFormat
32
              choices:
32
              choices:
33
                  US: 360,000.00 (US)
33
                  US: "360,000.00"
34
                  FR: 360 000,00 (FR)
34
                  US_SYMB_LEAD_SPACE: ¤ 360,000.00
35
                  US_SYMB_LEAD: ¤360,000.00
36
                  US_SYMB_TRAIL_SPACE: 360,000.00 ¤
37
                  US_SYMB_TRAIL: 360,000.00¤
38
                  FR: "360 000,00"
39
                  FR_SYMB_LEAD_SPACE: ¤ 360 000,00
40
                  FR_SYMB_LEAD: ¤360 000,00
41
                  FR_SYMB_TRAIL_SPACE: 360 000,00 ¤
42
                  FR_SYMB_TRAIL: 360 000,00¤
43
                  CH: "360'000.00"
44
                  CH_SYMB_LEAD_SPACE: ¤ 360'000.00
45
                  CH_SYMB_LEAD: ¤360'000.00
46
                  CH_SYMB_TRAIL_SPACE: 360'000.00 ¤
47
                  CH_SYMB_TRAIL: 360'000.00¤
35
        -
48
        -
36
            - Tax rates are
49
            - Tax rates are
37
            - pref: gist
50
            - pref: gist
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-3 / +3 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE Price %]
3
4
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home</title>
6
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home</title>
Lines 115-121 Link Here
115
                            [% IF ( OPACFinesTab ) %]
116
                            [% IF ( OPACFinesTab ) %]
116
                                [% IF ( BORROWER_INF.amountoverfive ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INF.amountoutstanding %])</a></li>[% END %]
117
                                [% IF ( BORROWER_INF.amountoverfive ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INF.amountoutstanding %])</a></li>[% END %]
117
                                [% IF ( BORROWER_INF.amountoverzero ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INF.amountoutstanding %])</a></li>[% END %]
118
                                [% IF ( BORROWER_INF.amountoverzero ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INF.amountoutstanding %])</a></li>[% END %]
118
                                [% IF ( BORROWER_INF.amountlessthanzero ) %]<li><a href="#opac-user-fines">Credits ([% BORROWER_INF.amountoutstanding %])</a></li>[% END %]
119
                                [% IF ( BORROWER_INF.amountlessthanzero ) %]<li><a href="#opac-user-fines">Credits ([% BORROWER_INF.amountoutstanding | $Price %])</a></li>[% END %]
119
                            [% END %]
120
                            [% END %]
120
                            [% IF ( waiting_count ) %][% IF ( BORROWER_INF.atdestination ) %]<li><a href="#opac-user-waiting">Waiting ([% waiting_count %])</a></li>[% END %][% END %]
121
                            [% IF ( waiting_count ) %][% IF ( BORROWER_INF.atdestination ) %]<li><a href="#opac-user-waiting">Waiting ([% waiting_count %])</a></li>[% END %][% END %]
121
                            [% IF ( reserves_count ) %]<li><a href="#opac-user-holds">Holds ([% reserves_count %])</a></li>[% END %]
122
                            [% IF ( reserves_count ) %]<li><a href="#opac-user-holds">Holds ([% reserves_count %])</a></li>[% END %]
Lines 324-330 Link Here
324
                                        <thead><tr><th colspan="2">Amount</th></tr></thead>
325
                                        <thead><tr><th colspan="2">Amount</th></tr></thead>
325
                                        <tbody>
326
                                        <tbody>
326
                                            <tr>
327
                                            <tr>
327
                                                <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
328
                                                <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding | $Price %]</a></td>
328
                                            </tr>
329
                                            </tr>
329
                                        </tbody>
330
                                        </tbody>
330
                                    </table>
331
                                    </table>
331
- 

Return to bug 4078