Bug 32748: (QA follow-up) Fix branchcode filtering on itemtypes

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Thibaud Guillot 2026-08-28 09:19:22 +02:00 committed by Pedro Amorim
parent 0794f75adc
commit e2506598c8
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 3 additions and 1 deletions

View File

@ -206,7 +206,9 @@ sub generate_subfield_form {
my $all_itemtypes = Koha::ItemTypes->search_with_localization;
my $filtered_itemtypes;
if ($branch_limit) {
$filtered_itemtypes = Koha::ItemTypes->search_with_localization( { branchcode => $branch_limit } );
$filtered_itemtypes =
Koha::ItemTypes->search_with_library_limits( {}, {}, $branch_limit )
->order_by_translated_description;
} else {
$filtered_itemtypes = $all_itemtypes;
}