@@ -, +, @@ FAIL C4/Letters.pm FAIL critic FAIL t/db_dependent/Letters.t FAIL critic --- C4/Letters.pm | 2 +- t/db_dependent/Letters.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/C4/Letters.pm +++ a/C4/Letters.pm @@ -634,7 +634,7 @@ sub GetPreparedLetter { $letter->{content} =~ s/<>/$OPACBaseURL/go; my $active_currency = Koha::Acquisition::Currencies->get_active; - my $currency_format = $active_currency->currency if defined($active_currency); + my $currency_format = (defined($active_currency)) ? $active_currency->currency : undef; my $borrowernumber = $tables->{borrowers}; my $lines = Koha::Account::Lines->search({ borrowernumber => $borrowernumber }); --- a/t/db_dependent/Letters.t +++ a/t/db_dependent/Letters.t @@ -365,7 +365,7 @@ $account->add_debit({ amount => 15, interface => 'test', type => 'OVERDUE'})->st my $lines = Koha::Account::Lines->search({ borrowernumber => $borrowernumber }); my $totalfine = $lines->total_outstanding; my $active_currency = Koha::Acquisition::Currencies->get_active; -my $currency_format = $active_currency->currency if defined($active_currency); +my $currency_format = (defined($active_currency)) ? $active_currency->currency : undef; my $totalfine_formatted = currency_format($currency_format, "$totalfine", FMT_SYMBOL); $totalfine_formatted = sprintf("%.2f", $totalfine) unless $totalfine_formatted; --