Bug 29554: Do not hide display of itemtypes on neworderempty

Hiding the list may lead to biblioitems.itemtype being NULL.
We do not want that, since 942$c is mandatory.

Test plan:
Create basket and set 'create items when' to receiving or
cataloging.
Create order from new empty record.
Check biblioitems.itemtype of created biblio.
Without this patch, it would have been NULL like this:
    select biblionumber,title from biblio;
    |            7 | Test 3                |
    select biblionumber,itemtype from biblioitems;
    |            7 | NULL     |

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2e650fdd0c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2021-11-22 13:00:57 +00:00 committed by Lucas Gass
parent 73d3abd65d
commit eb1083beb2
1 changed files with 1 additions and 3 deletions

View File

@ -363,9 +363,7 @@ if ($basketobj->effective_create_items eq 'ordering' && !$ordernumber) {
);
}
# Get the item types list, but only if item_level_itype is YES. Otherwise, it will be in the item, no need to display it in the biblio
my @itemtypes;
@itemtypes = Koha::ItemTypes->search->as_list unless C4::Context->preference('item-level_itypes');
my @itemtypes = Koha::ItemTypes->search->as_list;
if ( defined $from_subscriptionid ) {
# Get the last received order for this subscription