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