Bug 20446 Revert to using syspref for item creation

Using a per-basket setting is nonsensical when baskets
are created automatically by quote processing a few lines before
this attempts to read it. cron job aborts with a runtime error
leaving basket for quote half-created.
This reverts to the previous code using the global setting.
(Basket itself will have been set to the global setting
by default)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Colin Campbell 2018-03-19 10:45:26 +00:00 committed by Nick Clemens
parent 00c9f9b0ea
commit 84be52b39f
1 changed files with 1 additions and 3 deletions

View File

@ -797,9 +797,7 @@ sub quote_item {
);
}
my $basket = Koha::Acquisition::Basket->find( $basketno );
if ( $basket->effective_create_item eq 'ordering' ) {
if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) {
my $new_item = {
notforloan => -1,
cn_sort => q{},