|
Lines 400-411
my $itemnumber2;
Link Here
|
| 400 |
$biblionumber |
400 |
$biblionumber |
| 401 |
); |
401 |
); |
| 402 |
|
402 |
|
| 403 |
C4::Context->set_preference( 'UpdateItemLocationOnCheckin', q{} ); |
403 |
t::lib::Mocks::mock_preference( 'UpdateItemLocationOnCheckin', q{} ); |
| 404 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
404 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
| 405 |
my $item2 = GetItem( $itemnumber2 ); |
405 |
my $item2 = GetItem( $itemnumber2 ); |
| 406 |
ok( $item2->{location} eq 'FIC', 'UpdateItemLocationOnCheckin does not modify value when not enabled' ); |
406 |
ok( $item2->{location} eq 'FIC', 'UpdateItemLocationOnCheckin does not modify value when not enabled' ); |
| 407 |
|
407 |
|
| 408 |
C4::Context->set_preference( 'UpdateItemLocationOnCheckin', 'FIC: GEN' ); |
408 |
t::lib::Mocks::mock_preference( 'UpdateItemLocationOnCheckin', 'FIC: GEN' ); |
| 409 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
409 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
| 410 |
$item2 = GetItem( $itemnumber2 ); |
410 |
$item2 = GetItem( $itemnumber2 ); |
| 411 |
ok( $item2->{location} eq 'GEN', q{UpdateItemLocationOnCheckin updates location value from 'FIC' to 'GEN' with setting "FIC: GEN"} ); |
411 |
ok( $item2->{location} eq 'GEN', q{UpdateItemLocationOnCheckin updates location value from 'FIC' to 'GEN' with setting "FIC: GEN"} ); |
|
Lines 414-420
AddReturn( 'barcode_4', $samplebranch1->{branchcode} );
Link Here
|
| 414 |
$item2 = GetItem( $itemnumber2 ); |
414 |
$item2 = GetItem( $itemnumber2 ); |
| 415 |
ok( $item2->{location} eq 'GEN', q{UpdateItemLocationOnCheckin does not update location value from 'GEN' with setting "FIC: GEN"} ); |
415 |
ok( $item2->{location} eq 'GEN', q{UpdateItemLocationOnCheckin does not update location value from 'GEN' with setting "FIC: GEN"} ); |
| 416 |
|
416 |
|
| 417 |
C4::Context->set_preference( 'UpdateItemLocationOnCheckin', '_ALL_: CART' ); |
417 |
t::lib::Mocks::mock_preference( 'UpdateItemLocationOnCheckin', '_ALL_: CART' ); |
| 418 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
418 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
| 419 |
$item2 = GetItem( $itemnumber2 ); |
419 |
$item2 = GetItem( $itemnumber2 ); |
| 420 |
ok( $item2->{location} eq 'CART', q{UpdateItemLocationOnCheckin updates location value from 'GEN' with setting "_ALL_: CART"} ); |
420 |
ok( $item2->{location} eq 'CART', q{UpdateItemLocationOnCheckin updates location value from 'GEN' with setting "_ALL_: CART"} ); |
|
Lines 423-429
AddIssue( $borrower_1, 'barcode_4', $daysago10,0, $today, '' );
Link Here
|
| 423 |
$item2 = GetItem( $itemnumber2 ); |
423 |
$item2 = GetItem( $itemnumber2 ); |
| 424 |
ok( $item2->{location} eq 'GEN', q{Location updates from 'CART' to permanent location on issue} ); |
424 |
ok( $item2->{location} eq 'GEN', q{Location updates from 'CART' to permanent location on issue} ); |
| 425 |
|
425 |
|
| 426 |
C4::Context->set_preference( 'UpdateItemLocationOnCheckin', "GEN: _BLANK_\n_BLANK_: PROC\nPROC: _PERM_" ); |
426 |
t::lib::Mocks::mock_preference( 'UpdateItemLocationOnCheckin', "GEN: _BLANK_\n_BLANK_: PROC\nPROC: _PERM_" ); |
| 427 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
427 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
| 428 |
$item2 = GetItem( $itemnumber2 ); |
428 |
$item2 = GetItem( $itemnumber2 ); |
| 429 |
ok( $item2->{location} eq '', q{UpdateItemLocationOnCheckin updates location value from 'GEN' to '' with setting "GEN: _BLANK_"} ); |
429 |
ok( $item2->{location} eq '', q{UpdateItemLocationOnCheckin updates location value from 'GEN' to '' with setting "GEN: _BLANK_"} ); |
| 430 |
- |
|
|