|
Lines 143-153
my $itemtype = $builder->build(
Link Here
|
| 143 |
{ |
143 |
{ |
| 144 |
source => 'Itemtype', |
144 |
source => 'Itemtype', |
| 145 |
value => { |
145 |
value => { |
| 146 |
notforloan => undef, |
146 |
notforloan => 0, |
| 147 |
rentalcharge => 0, |
147 |
rentalcharge => 0, |
| 148 |
rentalcharge_daily => 0, |
148 |
rentalcharge_daily => 0, |
| 149 |
defaultreplacecost => undef, |
149 |
defaultreplacecost => undef, |
| 150 |
processfee => undef |
150 |
processfee => undef |
| 151 |
} |
151 |
} |
| 152 |
} |
152 |
} |
| 153 |
)->{itemtype}; |
153 |
)->{itemtype}; |
|
Lines 4650-4656
subtest 'CanBookBeIssued | notforloan' => sub {
Link Here
|
| 4650 |
my $itemtype = $builder->build( |
4650 |
my $itemtype = $builder->build( |
| 4651 |
{ |
4651 |
{ |
| 4652 |
source => 'Itemtype', |
4652 |
source => 'Itemtype', |
| 4653 |
value => { notforloan => undef, } |
4653 |
value => { notforloan => 0, } |
| 4654 |
} |
4654 |
} |
| 4655 |
); |
4655 |
); |
| 4656 |
my $item = $builder->build_sample_item( |
4656 |
my $item = $builder->build_sample_item( |
|
Lines 4684-4690
subtest 'CanBookBeIssued | notforloan' => sub {
Link Here
|
| 4684 |
); |
4684 |
); |
| 4685 |
|
4685 |
|
| 4686 |
# not for loan at item level |
4686 |
# not for loan at item level |
| 4687 |
Koha::ItemTypes->find( $itemtype->{itemtype} )->notforloan(undef)->store; |
4687 |
Koha::ItemTypes->find( $itemtype->{itemtype} )->notforloan(0)->store; |
| 4688 |
$item->notforloan( 1 )->store; |
4688 |
$item->notforloan( 1 )->store; |
| 4689 |
( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $item->barcode, undef, undef, undef, undef ); |
4689 |
( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $item->barcode, undef, undef, undef, undef ); |
| 4690 |
is_deeply( $needsconfirmation, {}, 'No confirmation needed, AllowNotForLoanOverride=0' ); |
4690 |
is_deeply( $needsconfirmation, {}, 'No confirmation needed, AllowNotForLoanOverride=0' ); |
|
Lines 4704-4710
subtest 'CanBookBeIssued | notforloan' => sub {
Link Here
|
| 4704 |
my $itemtype = $builder->build( |
4704 |
my $itemtype = $builder->build( |
| 4705 |
{ |
4705 |
{ |
| 4706 |
source => 'Itemtype', |
4706 |
source => 'Itemtype', |
| 4707 |
value => { notforloan => undef, } |
4707 |
value => { notforloan => 0, } |
| 4708 |
} |
4708 |
} |
| 4709 |
); |
4709 |
); |
| 4710 |
|
4710 |
|
|
Lines 4726-4732
subtest 'CanBookBeIssued | notforloan' => sub {
Link Here
|
| 4726 |
); |
4726 |
); |
| 4727 |
|
4727 |
|
| 4728 |
# not for loan at item level |
4728 |
# not for loan at item level |
| 4729 |
Koha::ItemTypes->find( $itemtype->{itemtype} )->notforloan(undef)->store; |
4729 |
Koha::ItemTypes->find( $itemtype->{itemtype} )->notforloan(0)->store; |
| 4730 |
$item->notforloan( 1 )->store; |
4730 |
$item->notforloan( 1 )->store; |
| 4731 |
( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $item->barcode, undef, undef, undef, undef ); |
4731 |
( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $item->barcode, undef, undef, undef, undef ); |
| 4732 |
is_deeply( $needsconfirmation, {}, 'No confirmation needed, AllowNotForLoanOverride=0' ); |
4732 |
is_deeply( $needsconfirmation, {}, 'No confirmation needed, AllowNotForLoanOverride=0' ); |
|
Lines 5191-5197
subtest 'Incremented fee tests' => sub {
Link Here
|
| 5191 |
{ |
5191 |
{ |
| 5192 |
class => 'Koha::ItemTypes', |
5192 |
class => 'Koha::ItemTypes', |
| 5193 |
value => { |
5193 |
value => { |
| 5194 |
notforloan => undef, |
5194 |
notforloan => 0, |
| 5195 |
rentalcharge => 0, |
5195 |
rentalcharge => 0, |
| 5196 |
rentalcharge_daily => 1, |
5196 |
rentalcharge_daily => 1, |
| 5197 |
rentalcharge_daily_calendar => 0 |
5197 |
rentalcharge_daily_calendar => 0 |
|
Lines 5456-5463
subtest 'CanBookBeIssued & RentalFeesCheckoutConfirmation' => sub {
Link Here
|
| 5456 |
{ |
5456 |
{ |
| 5457 |
class => 'Koha::ItemTypes', |
5457 |
class => 'Koha::ItemTypes', |
| 5458 |
value => { |
5458 |
value => { |
| 5459 |
notforloan => 0, |
5459 |
notforloan => 0, |
| 5460 |
rentalcharge => 0, |
5460 |
rentalcharge => 0, |
| 5461 |
rentalcharge_daily => 0 |
5461 |
rentalcharge_daily => 0 |
| 5462 |
} |
5462 |
} |
| 5463 |
} |
5463 |
} |