From f0eda04ddf5b879b2c2a2d10745beda58e239e05 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Marc Véron Signed-off-by: Julian Maurice Signed-off-by: Kyle M Hall --- 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.39.5