Lines 70-75
sub add {
Link Here
|
70 |
unless scalar @enrollments; |
70 |
unless scalar @enrollments; |
71 |
|
71 |
|
72 |
my $biblio = Koha::Biblios->find( $params->{biblio_id} ); |
72 |
my $biblio = Koha::Biblios->find( $params->{biblio_id} ); |
|
|
73 |
|
74 |
if ( !C4::Context->preference('ReserveExpiration') and $params->{expiration_date} ) { |
75 |
Koha::Exceptions::Hold::ExpirationDateDisabled->throw; |
76 |
} |
73 |
|
77 |
|
74 |
my $club_params = { |
78 |
my $club_params = { |
75 |
club_id => $params->{club_id}, |
79 |
club_id => $params->{club_id}, |
Lines 131-137
sub add {
Link Here
|
131 |
borrowernumber => $patron_id, |
135 |
borrowernumber => $patron_id, |
132 |
biblionumber => $params->{biblio_id}, |
136 |
biblionumber => $params->{biblio_id}, |
133 |
priority => $priority, |
137 |
priority => $priority, |
134 |
expiration_date => C4::Context->preference('ReserveExpiration') ? $params->{expiration_date} : undef, |
138 |
expiration_date => $params->{expiration_date}, |
135 |
notes => $params->{notes}, |
139 |
notes => $params->{notes}, |
136 |
title => $biblio->title, |
140 |
title => $biblio->title, |
137 |
itemnumber => $params->{item_id}, |
141 |
itemnumber => $params->{item_id}, |