|
Lines 185-191
sub AddReserve {
Link Here
|
| 185 |
my $biblionumber = $params->{biblionumber}; |
185 |
my $biblionumber = $params->{biblionumber}; |
| 186 |
my $priority = $params->{priority}; |
186 |
my $priority = $params->{priority}; |
| 187 |
my $resdate = $params->{reservation_date}; |
187 |
my $resdate = $params->{reservation_date}; |
| 188 |
my $expdate = $params->{expiration_date}; |
188 |
my $patron_expiration_date = $params->{expiration_date}; |
| 189 |
my $notes = $params->{notes}; |
189 |
my $notes = $params->{notes}; |
| 190 |
my $title = $params->{title}; |
190 |
my $title = $params->{title}; |
| 191 |
my $checkitem = $params->{itemnumber}; |
191 |
my $checkitem = $params->{itemnumber}; |
|
Lines 196-202
sub AddReserve {
Link Here
|
| 196 |
$resdate = output_pref( { str => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }) |
196 |
$resdate = output_pref( { str => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }) |
| 197 |
or output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); |
197 |
or output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); |
| 198 |
|
198 |
|
| 199 |
$expdate = output_pref({ str => $expdate, dateonly => 1, dateformat => 'iso' }); |
199 |
$patron_expiration_date = output_pref({ str => $patron_expiration_date, dateonly => 1, dateformat => 'iso' }); |
| 200 |
|
200 |
|
| 201 |
# if we have an item selectionned, and the pickup branch is the same as the holdingbranch |
201 |
# if we have an item selectionned, and the pickup branch is the same as the holdingbranch |
| 202 |
# of the document, we force the value $priority and $found . |
202 |
# of the document, we force the value $priority and $found . |
|
Lines 252-258
sub AddReserve {
Link Here
|
| 252 |
itemnumber => $checkitem, |
252 |
itemnumber => $checkitem, |
| 253 |
found => $found, |
253 |
found => $found, |
| 254 |
waitingdate => $waitingdate, |
254 |
waitingdate => $waitingdate, |
| 255 |
expirationdate => $expdate, |
255 |
patron_expiration_date => $patron_expiration_date, |
| 256 |
itemtype => $itemtype, |
256 |
itemtype => $itemtype, |
| 257 |
item_level_hold => $checkitem ? 1 : 0, |
257 |
item_level_hold => $checkitem ? 1 : 0, |
| 258 |
non_priority => $non_priority ? 1 : 0, |
258 |
non_priority => $non_priority ? 1 : 0, |
|
Lines 946-952
sub CancelExpiredReserves {
Link Here
|
| 946 |
my $expireWaiting = C4::Context->preference('ExpireReservesMaxPickUpDelay'); |
946 |
my $expireWaiting = C4::Context->preference('ExpireReservesMaxPickUpDelay'); |
| 947 |
|
947 |
|
| 948 |
my $dtf = Koha::Database->new->schema->storage->datetime_parser; |
948 |
my $dtf = Koha::Database->new->schema->storage->datetime_parser; |
| 949 |
my $params = { expirationdate => { '<', $dtf->format_date($today) } }; |
949 |
my $params = { |
|
|
950 |
-or => [ |
| 951 |
{ expirationdate => { '<', $dtf->format_date($today) } }, |
| 952 |
{ patron_expiration_date => { '<' => $dtf->format_date($today) } } |
| 953 |
] |
| 954 |
}; |
| 955 |
|
| 950 |
$params->{found} = [ { '!=', 'W' }, undef ] unless $expireWaiting; |
956 |
$params->{found} = [ { '!=', 'W' }, undef ] unless $expireWaiting; |
| 951 |
|
957 |
|
| 952 |
# FIXME To move to Koha::Holds->search_expired (?) |
958 |
# FIXME To move to Koha::Holds->search_expired (?) |
|
Lines 2099-2104
sub RevertWaitingStatus {
Link Here
|
| 2099 |
priority => 1, |
2105 |
priority => 1, |
| 2100 |
found => undef, |
2106 |
found => undef, |
| 2101 |
waitingdate => undef, |
2107 |
waitingdate => undef, |
|
|
2108 |
expirationdate => $hold->patron_expiration_date, |
| 2102 |
itemnumber => $hold->item_level_hold ? $hold->itemnumber : undef, |
2109 |
itemnumber => $hold->item_level_hold ? $hold->itemnumber : undef, |
| 2103 |
} |
2110 |
} |
| 2104 |
)->store(); |
2111 |
)->store(); |