https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17944

--- Comment #9 from Alex Buckley <[email protected]> ---
So before I attach the new commit just to check would you be happy with this?

 my $schema = Koha::Database->new()->schema();
 my $itemtotal = $schema->resultset('Item')->search({ 'itype' =>
$itemtype_code})->count;
 my $bibliototal = $schema->resultset('Biblioitem')->search({ 'itemtype' =>
$itemtype_code})->count;

 my $overalltotal = $itemtotal + $bibliototal;

 if ($overalltotal) {
      push @messages, { type => 'error', code => 'cannot_be_deleted', total =>
$overalltotal };
      $op = 'list';
 } else {
      my $itemtype = Koha::ItemTypes->find($itemtype_code);
      $template->param( itemtype => $itemtype, );
}   

I have tested it and it outputs the correct value

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to