Bugzilla – Attachment 31586 Details for
Bug 12353
Reserves last pickup date needs to respect holidays, and everybody need to know the last pickup date for reserves, even notices.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12353 - cancel_expired_holds.pl -cronjob respects last pickup date
0005-Bug-12353-cancel_expired_holds.pl-cronjob-respects-l.patch (text/plain), 1.66 KB, created by
Olli-Antti Kivilahti
on 2014-09-14 10:37:58 UTC
(
hide
)
Description:
Bug 12353 - cancel_expired_holds.pl -cronjob respects last pickup date
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2014-09-14 10:37:58 UTC
Size:
1.66 KB
patch
obsolete
>From 48fb8dfa533c86a8db4d98f01a8bcae4bead9945 Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Sun, 14 Sep 2014 12:29:58 +0300 >Subject: [PATCH 5/6] Bug 12353 - cancel_expired_holds.pl -cronjob respects > last pickup date > >--- > C4/Reserves.pm | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index b7af359..4da363d 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -724,7 +724,7 @@ sub GetReservesForBranch { > my $dbh = C4::Context->dbh; > > my $query = " >- SELECT reserve_id,borrowernumber,reservedate,itemnumber,waitingdate >+ SELECT reserve_id,borrowernumber,reservedate,itemnumber,waitingdate,branchcode > FROM reserves > WHERE priority='0' > AND found='W' >@@ -940,12 +940,16 @@ sub CancelExpiredReserves { > $sth = $dbh->prepare( $query ); > $sth->execute( $max_pickup_delay ); > >+ my $today = DateTime->now( time_zone => C4::Context->tz() ); >+ > while (my $res = $sth->fetchrow_hashref ) { >- if ( $charge ) { >- manualinvoice($res->{'borrowernumber'}, $res->{'itemnumber'}, 'Hold waiting too long', 'F', $charge); >+ my $expiration = _reserve_last_pickup_date( $res ); >+ if ( $today > $expiration ) { >+ if ( $charge ) { >+ manualinvoice($res->{'borrowernumber'}, $res->{'itemnumber'}, 'Hold waiting too long', 'F', $charge); >+ } >+ CancelReserve({ reserve_id => $res->{'reserve_id'} }); > } >- >- CancelReserve({ reserve_id => $res->{'reserve_id'} }); > } > } > >-- >1.7.9.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12353
:
31556
|
31572
|
31584
|
31585
| 31586