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

--- Comment #7 from M. Tompsett <[email protected]> ---
Comment on attachment 59564
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59564
Bug 17944 - Removed the sql code from Itemtypes.pm and replaced it with DBIx
database query in the itemtypes.pl administrative script

Review of attachment 59564:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17944&attachment=59564)
-----------------------------------------------------------------

::: admin/itemtypes.pl
@@ +145,5 @@
> +    my $itemtotal = $schema->resultset('Item')->search({ 'itype' => 
> $itemtype_code} );
> +    my $bibliototal = $schema->resultset('Biblioitem')->search({ 'itemtype' 
> => $itemtype_code} );
> +
> +    $itemtotal->count;
> +    $bibliototal->count;

Why?

@@ +146,5 @@
> +    my $bibliototal = $schema->resultset('Biblioitem')->search({ 'itemtype' 
> => $itemtype_code} );
> +
> +    $itemtotal->count;
> +    $bibliototal->count;
> +    my $overalltotal = $itemtotal + $bibliototal;

I like the idea, but this segment of code is not quite right.

Why the context line?
why not my $foo = $schema->resulset('Bar')->search({ 'foobar' => $itemtypecode
})->count // 0; with the appropriate variables and tables changed?

-- 
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