Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 45; |
20 |
use Test::More tests => 47; |
21 |
use DateTime::Duration; |
21 |
use DateTime::Duration; |
22 |
|
22 |
|
23 |
use t::lib::Mocks; |
23 |
use t::lib::Mocks; |
Lines 423-429
ok( $item2->location eq '' , q{UpdateItemLocationOnCheckin updates location valu
Link Here
|
423 |
ok( $item2->permanent_location eq '' , q{UpdateItemLocationOnCheckin does not update permanent_location from '' with setting "PROC: _PERM_" } ); |
423 |
ok( $item2->permanent_location eq '' , q{UpdateItemLocationOnCheckin does not update permanent_location from '' with setting "PROC: _PERM_" } ); |
424 |
|
424 |
|
425 |
|
425 |
|
|
|
426 |
my $itemnumber3; |
427 |
($biblionumber, $biblioitemnumber, $itemnumber3) = C4::Items::AddItem( |
428 |
{ |
429 |
barcode => 'barcode_5', |
430 |
itemcallnumber => 'callnumber5', |
431 |
homebranch => $branchcode_1, |
432 |
holdingbranch => $branchcode_1, |
433 |
location => 'CART', |
434 |
itype => $itemtype |
435 |
}, |
436 |
$biblionumber |
437 |
); |
426 |
|
438 |
|
|
|
439 |
#BlankItemLocationOnCheckout |
440 |
t::lib::Mocks::mock_preference('UpdateItemLocationOnCheckout', 0); |
441 |
AddIssue($borrower_1, 'barcode_5', $daysago10, 0, $today, 0); |
442 |
my $item3 = GetItem($itemnumber3); |
443 |
ok($item3->location eq 'CART'), |
444 |
q{UpdateItemLocationOnCheckout does not update item shelving location value from 'CART' to '' when not enabled} ); |
445 |
|
446 |
t::lib::Mocks::mock_preference('UpdateItemLocationOnCheckout', 1); |
447 |
if (C4::Context->preference('UpdateItemLocationOnCheckout') ) |
448 |
{ |
449 |
BlankShelvingLocation($itemnumber3); |
450 |
} |
451 |
$item3 = GetItem($itemnumber3); |
452 |
ok($item3->location eq '', q{UpdateItemLocationOnCheckout updates item shelving location value from 'CART' |
453 |
to '' when enabled} ); |
427 |
|
454 |
|
428 |
# Bug 14640 - Cancel the hold on checking out if asked |
455 |
# Bug 14640 - Cancel the hold on checking out if asked |
429 |
my $reserve_id = AddReserve($branchcode_1, $borrower_id1, $biblionumber, |
456 |
my $reserve_id = AddReserve($branchcode_1, $borrower_id1, $biblionumber, |
430 |
- |
|
|