Lines 40-45
use Koha::Patrons;
Link Here
|
40 |
use Koha::Subscriptions; |
40 |
use Koha::Subscriptions; |
41 |
use Koha::Account::Lines; |
41 |
use Koha::Account::Lines; |
42 |
use Koha::Account::Offsets; |
42 |
use Koha::Account::Offsets; |
|
|
43 |
use Koha::Items; |
43 |
|
44 |
|
44 |
my $schema = Koha::Database->schema; |
45 |
my $schema = Koha::Database->schema; |
45 |
$schema->storage->txn_begin; |
46 |
$schema->storage->txn_begin; |
Lines 2379-2385
subtest '_FixOverduesOnReturn' => sub {
Link Here
|
2379 |
}; |
2380 |
}; |
2380 |
|
2381 |
|
2381 |
subtest 'Set waiting flag' => sub { |
2382 |
subtest 'Set waiting flag' => sub { |
2382 |
plan tests => 4; |
2383 |
plan tests => 6; |
2383 |
|
2384 |
|
2384 |
my $library_1 = $builder->build( { source => 'Branch' } ); |
2385 |
my $library_1 = $builder->build( { source => 'Branch' } ); |
2385 |
my $patron_1 = $builder->build( { source => 'Borrower', value => { branchcode => $library_1->{branchcode}, categorycode => $patron_category->{categorycode} } } ); |
2386 |
my $patron_1 = $builder->build( { source => 'Borrower', value => { branchcode => $library_1->{branchcode}, categorycode => $patron_category->{categorycode} } } ); |
Lines 2427-2432
subtest 'Set waiting flag' => sub {
Link Here
|
2427 |
is( $hold->found, 'W', 'Hold is waiting' ); |
2428 |
is( $hold->found, 'W', 'Hold is waiting' ); |
2428 |
( $status ) = CheckReserves($item->{itemnumber}); |
2429 |
( $status ) = CheckReserves($item->{itemnumber}); |
2429 |
is( $status, 'Waiting', 'Now the hold is waiting'); |
2430 |
is( $status, 'Waiting', 'Now the hold is waiting'); |
|
|
2431 |
|
2432 |
#Bug 21944 - Waiting transfer checked in at branch other than pickup location |
2433 |
set_userenv( $library_1 ); |
2434 |
$do_transfer = 1; |
2435 |
AddReturn ( $item->{barcode}, $library_1->{branchcode} ); |
2436 |
ModReserveAffect( $item->{itemnumber}, undef, $do_transfer, $reserve_id ); |
2437 |
$hold = Koha::Holds->find( $reserve_id ); |
2438 |
is( $hold->found, 'T', 'Hold is changed from Waiting to Transfer' ); |
2439 |
( $status ) = CheckReserves($item->{itemnumber}); |
2440 |
is( $status, 'Reserved', 'Item is now set to a priority level'); |
2441 |
|
2430 |
}; |
2442 |
}; |
2431 |
|
2443 |
|
2432 |
subtest 'CanBookBeIssued | is_overdue' => sub { |
2444 |
subtest 'CanBookBeIssued | is_overdue' => sub { |
2433 |
- |
|
|