From 0dc4c80e27f88042a0b6456e0b3a6b7800cd7beb Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 23 May 2017 13:02:30 -0300 Subject: [PATCH] Bug 18662: Fix currency deletion Sounds like it is caused by bug 13726. It is not possible to delete a currency, even if not used by any vendors Test plan: Try and delete currencies used or not by vendors. --- admin/currency.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/currency.pl b/admin/currency.pl index 09b6a74e2d..1c5ec3e586 100755 --- a/admin/currency.pl +++ b/admin/currency.pl @@ -95,7 +95,7 @@ if ( $op eq 'add_form' ) { # TODO rewrite the following when Koha::Acquisition::Orders will use Koha::Objects my $schema = Koha::Database->schema; my $nb_of_orders = $schema->resultset('Aqorder')->search( { currency => $currency->currency } )->count; - my $nb_of_vendors = Koha::Acquisition::Booksellers->search( { -or => { listprice => $currency->currency, invoiceprice => $currency->currency } }); + my $nb_of_vendors = Koha::Acquisition::Booksellers->search( { -or => { listprice => $currency->currency, invoiceprice => $currency->currency } })->count; $template->param( currency => $currency, nb_of_orders => $nb_of_orders, -- 2.11.0