Bugzilla – Attachment 74738 Details for
Bug 20625
Cannot add new patron category without currency
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20625: Handle non existing of active currency
Bug-20625-Handle-non-existing-of-active-currency.patch (text/plain), 1.58 KB, created by
Jonathan Druart
on 2018-04-23 15:11:32 UTC
(
hide
)
Description:
Bug 20625: Handle non existing of active currency
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-04-23 15:11:32 UTC
Size:
1.58 KB
patch
obsolete
>From 7a1dcbea312dea5b3f53fd42a460878d8b52400c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 23 Apr 2018 12:07:58 -0300 >Subject: [PATCH] Bug 20625: Handle non existing of active currency > >This patch avoid the explosion in the air when creating a new patron >category and no active currency is defined. > >Test plan: >Remove the currencies, create a new patron category >Without this patch applied you will get > Can't call method "p_sep_by_space" on an undefined value > >With this patch the form will be displayed correctly and you will be >able to create the patron category >--- > Koha/Number/Price.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/Number/Price.pm b/Koha/Number/Price.pm >index 899044f800..f549d8a243 100644 >--- a/Koha/Number/Price.pm >+++ b/Koha/Number/Price.pm >@@ -89,7 +89,7 @@ sub _format_params { > my $currency = Koha::Acquisition::Currencies->get_active; > my $currency_format = C4::Context->preference("CurrencyFormat"); > >- my $int_curr_symbol = $with_symbol ? $currency->symbol : q||; >+ my $int_curr_symbol = ( $with_symbol and $currency ) ? $currency->symbol : q||; > my %format_params = ( > decimal_fill => '2', > decimal_point => '.', >@@ -123,7 +123,7 @@ sub _format_params { > > > $format_params{p_cs_precedes} = $p_cs_precedes if defined $p_cs_precedes; >- $format_params{p_sep_by_space} = $currency->p_sep_by_space ? 1 : 0; >+ $format_params{p_sep_by_space} = ( $currency and $currency->p_sep_by_space ) ? 1 : 0; > > return \%format_params; > } >-- >2.11.0
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 20625
:
74737
|
74738
|
74740
|
74741
|
74774
|
74775