https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17944 --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- 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.