|
Lines 27-33
use C4::Items;
Link Here
|
| 27 |
use C4::Context; |
27 |
use C4::Context; |
| 28 |
use C4::Reserves; |
28 |
use C4::Reserves; |
| 29 |
|
29 |
|
| 30 |
use Test::More tests => 32; |
30 |
use Test::More tests => 35; |
| 31 |
|
31 |
|
| 32 |
BEGIN { |
32 |
BEGIN { |
| 33 |
use_ok('C4::Circulation'); |
33 |
use_ok('C4::Circulation'); |
|
Lines 389-394
AddReturn( 'barcode_3', $samplebranch1->{branchcode} );
Link Here
|
| 389 |
$item = GetItem( $itemnumber ); |
389 |
$item = GetItem( $itemnumber ); |
| 390 |
ok( $item->{notforloan} eq 9, q{UpdateNotForLoanStatusOnCheckin does not update notforloan value from 9 with setting "1: 9"} ); |
390 |
ok( $item->{notforloan} eq 9, q{UpdateNotForLoanStatusOnCheckin does not update notforloan value from 9 with setting "1: 9"} ); |
| 391 |
|
391 |
|
|
|
392 |
my $itemnumber2; |
| 393 |
($biblionumber, $biblioitemnumber, $itemnumber2) = C4::Items::AddItem( |
| 394 |
{ |
| 395 |
barcode => 'barcode_4', |
| 396 |
itemcallnumber => 'callnumber4', |
| 397 |
homebranch => $samplebranch1->{branchcode}, |
| 398 |
holdingbranch => $samplebranch1->{branchcode}, |
| 399 |
location => 'FIC', |
| 400 |
}, |
| 401 |
$biblionumber |
| 402 |
); |
| 403 |
|
| 404 |
C4::Context->set_preference( 'UpdateItemLocationOnCheckin', q{} ); |
| 405 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
| 406 |
my $item2 = GetItem( $itemnumber2 ); |
| 407 |
ok( $item2->{location} eq 'FIC', 'UpdateItemLocationOnCheckin does not modify value when not enabled' ); |
| 408 |
|
| 409 |
C4::Context->set_preference( 'UpdateItemLocationOnCheckin', 'FIC: GEN' ); |
| 410 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
| 411 |
$item2 = GetItem( $itemnumber2 ); |
| 412 |
ok( $item2->{location} eq 'GEN', q{UpdateItemLocationOnCheckin updates location value from 'FIC' to 'GEN' with setting "FIC: GEN"} ); |
| 413 |
|
| 414 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
| 415 |
$item2 = GetItem( $itemnumber2 ); |
| 416 |
ok( $item2->{location} eq 'GEN', q{UpdateItemLocationOnCheckin does not update location value from 'GEN' with setting "FIC: GEN"} ); |
| 417 |
|
| 392 |
# Bug 14640 - Cancel the hold on checking out if asked |
418 |
# Bug 14640 - Cancel the hold on checking out if asked |
| 393 |
my $reserve_id = AddReserve('CPL', $borrower_id1, $biblionumber, |
419 |
my $reserve_id = AddReserve('CPL', $borrower_id1, $biblionumber, |
| 394 |
undef, 1, undef, undef, "a note", "a title", undef, ''); |
420 |
undef, 1, undef, undef, "a note", "a title", undef, ''); |
| 395 |
- |
|
|