Bugzilla – Attachment 64840 Details for
Bug 18900
Wrong number format in receiving order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18900 - wrong number format in receiving order
Bug-18900---wrong-number-format-in-receiving-order.patch (text/plain), 1.50 KB, created by
Fridolin Somers
on 2017-07-06 09:01:02 UTC
(
hide
)
Description:
Bug 18900 - wrong number format in receiving order
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2017-07-06 09:01:02 UTC
Size:
1.50 KB
patch
obsolete
>From c101839276edb8fed4278b4967c7e27d1d69bdc0 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 6 Jul 2017 08:48:18 +0200 >Subject: [PATCH] Bug 18900 - wrong number format in receiving order > >Bug 18471 added number formating in order receive. > >I found a bug generated by this. >Koha::Number::Price defines methods to (un)format price depending on CurrencyFormat syspref. >The bug is that for CurrencyFormat US, some params are not defined in this module so there are retrieved from system locale. If system locale is not en_US, the params will be wrong. For example fr_FR will define ',' as decimal and so saved unit price is divided by 1000. > >To recreate: >- On a server with locale 'fr_FR' >- With Plack mode >- Set CurrencyFormat on 'US' >- Open a basket >- Place an order for an item >- Close basket >- Receive order with changing 'Actual Cost' to '1,234' >- Note the 'Actual Cost' is now '1.23' >- Run unit test t/Number/Price.t without and with patch >--- > Koha/Number/Price.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/Koha/Number/Price.pm b/Koha/Number/Price.pm >index 21d9643..77d5b21 100644 >--- a/Koha/Number/Price.pm >+++ b/Koha/Number/Price.pm >@@ -87,8 +87,11 @@ sub _format_params { > > my $int_curr_symbol = q||; > my %format_params = ( >+ decimal_fill => '2', >+ decimal_point => '.', > int_curr_symbol => $int_curr_symbol, > mon_thousands_sep => ',', >+ thousands_sep => ',', > mon_decimal_point => '.' > ); > >-- >2.7.4
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 18900
:
64838
|
64839
|
64840
|
65627
|
65628
|
65759
|
65760
|
65761