From a5d6e9068b551698fc3ad9699fee0a1b540f3769 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 1 Mar 2023 12:31:17 +0100 Subject: [PATCH] Bug 33103: Make vendors searchable by aliases --- acqui/booksellers.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 43407ddad84..c9476f61797 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -82,8 +82,15 @@ if ($booksellerid) { push @suppliers, Koha::Acquisition::Booksellers->find( $booksellerid ); } else { @suppliers = Koha::Acquisition::Booksellers->search( - { name => { -like => "%$supplier%" } }, - { order_by => { -asc => 'name' } } )->as_list; + [ + { name => { -like => "%$supplier%" } }, + { 'aqbookseller_aliases.alias' => { -like => "%$supplier%" } }, + ], + { + order_by => { -asc => 'name' }, + join => 'aqbookseller_aliases', + } + )->as_list; } my $supplier_count = @suppliers; -- 2.25.1