Bugzilla – Attachment 66705 Details for
Bug 11580
If returnBeforeExpiry is on, holidays are not taken into account to calculate the due date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11580 - If returnBeforeExpiry is ON, use calendar to calculate return date not on closed day (depending on useDaysMode)
Bug-11580---If-returnBeforeExpiry-is-ON-use-calend.patch (text/plain), 1.43 KB, created by
Kyle M Hall (khall)
on 2017-09-01 10:52:55 UTC
(
hide
)
Description:
Bug 11580 - If returnBeforeExpiry is ON, use calendar to calculate return date not on closed day (depending on useDaysMode)
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-09-01 10:52:55 UTC
Size:
1.43 KB
patch
obsolete
>From bbdcf079101e3da2a9778fd22447dbb7fd09c64a Mon Sep 17 00:00:00 2001 >From: Sophie Meynieux <sophie.meynieux@biblibre.com> >Date: Wed, 16 Nov 2016 16:46:04 +0100 >Subject: [PATCH] Bug 11580 - If returnBeforeExpiry is ON, use calendar to > calculate return date not on closed day (depending on useDaysMode) > >Test plan: >1. ReturnBeforeExpiry is activated >2. useDaysMode is different from "circulation rules only" >3. Set expiry date of a patron to a near date >4. Set a closed day on calendar for this date >5. Do a checkout > >Without patch, return date will be patron expiration date >With the patch, return date will be last open day before patron expiration day > >Signed-off-by: Claire Gravely <claire_gravely@hotmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Circulation.pm | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index fba723f..7434d64 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3513,6 +3513,11 @@ sub CalcDateDue { > $datedue = $expiry_dt->clone->set_time_zone( C4::Context->tz ); > } > } >+ if ( C4::Context->preference('useDaysMode') ne 'Days' ) { >+ # Don't return on a closed day >+ my $calendar = Koha::Calendar->new( branchcode => $branch ); >+ $datedue = $calendar->prev_open_day( $datedue ); >+ } > } > > return $datedue; >-- >2.10.2
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 11580
:
57562
|
58740
|
60621
|
64681
|
65779
|
65780
| 66705 |
66706
|
66707
|
66886
|
66888