@@ -, +, @@ --- .../prog/en/modules/tools/inventory.tt | 2 +- tools/inventory.pl | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -159,7 +159,7 @@ --- a/tools/inventory.pl +++ a/tools/inventory.pl @@ -42,6 +42,7 @@ use Koha::AuthorisedValues; use Koha::BiblioFrameworks; use Koha::ClassSources; use Koha::Items; +use Koha::Item::Bundles; use List::MoreUtils qw( none ); @@ -70,18 +71,10 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); -my $schema = Koha::Database->new()->schema(); -my $item_bundles_rs = Koha::Items->search( - { - 'item_bundles_hosts.item' => { '!=' => undef }, - }, - { - join => 'item_bundles_hosts', - group_by => 'itemnumber', - } -); - -my @item_bundles = $item_bundles_rs->as_list; +my @item_bundles = Koha::Item::Bundles->search( + {}, + { group_by => [ 'host' ], columns => [ 'host' ] }, +)->as_list; my @authorised_value_list; my $authorisedvalue_categories = ''; --