From c0911ba8b782c29418fb6fe11356a71afbeb6340 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 Signed-off-by: Jonathan Field --- acqui/booksellers.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 43407ddad8..c9476f6179 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.30.2