@@ -, +, @@ --- admin/itemtypes.pl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- a/admin/itemtypes.pl +++ a/admin/itemtypes.pl @@ -140,13 +140,10 @@ if ( $op eq 'add_form' ) { } elsif ( $op eq 'delete_confirm' ) { - my $context = C4::Context->new; my $schema = Koha::Database->new()->schema(); - my $itemtotal = $schema->resultset('Item')->search({ 'itype' => $itemtype_code} ); - my $bibliototal = $schema->resultset('Biblioitem')->search({ 'itemtype' => $itemtype_code} ); + my $itemtotal = $schema->resultset('Item')->search({ 'itype' => $itemtype_code})->count; + my $bibliototal = $schema->resultset('Biblioitem')->search({ 'itemtype' => $itemtype_code})->count; - $itemtotal->count; - $bibliototal->count; my $overalltotal = $itemtotal + $bibliototal; if ($overalltotal) { --