Bug 33103: Make vendors searchable by aliases

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-03-01 12:31:17 +01:00 committed by Tomas Cohen Arazi
parent 5e3980502b
commit 359780886e
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -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;
{ 'aqbookseller_aliases.alias' => { -like => "%$supplier%" } },
],
{
order_by => { -asc => 'name' },
join => 'aqbookseller_aliases',
}
)->as_list;
}
my $supplier_count = @suppliers;