Bugzilla – Attachment 106019 Details for
Bug 24159
Allow daysMode for calculating due and renewal dates to be set at the circulation rules level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24159: Use days_mode circ rule to calculate the dropbox date
Bug-24159-Use-daysmode-circ-rule-to-calculate-the-.patch (text/plain), 1.55 KB, created by
Martin Renvoize (ashimema)
on 2020-06-18 14:56:43 UTC
(
hide
)
Description:
Bug 24159: Use days_mode circ rule to calculate the dropbox date
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-06-18 14:56:43 UTC
Size:
1.55 KB
patch
obsolete
>From 566978baaeb4c58732cc0f672e4ce7484a7aaea4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 12 Mar 2020 08:46:59 +0100 >Subject: [PATCH] Bug 24159: Use days_mode circ rule to calculate the dropbox > date > >Calculate the drop box date depending on the circ rule. Note that only >the branchcode is taken into account here. Is that correct? > >Test plan: >Use the drop box date feature and confirm that it takes into account the >calendar, depending on the circ rule. > >Signed-off-by: Simon Perry <simon.perry@itcarlow.ie> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Checkouts.pm | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/Koha/Checkouts.pm b/Koha/Checkouts.pm >index 84d4253e72..1f33cb1d81 100644 >--- a/Koha/Checkouts.pm >+++ b/Koha/Checkouts.pm >@@ -48,8 +48,15 @@ sub calculate_dropbox_date { > my $userenv = C4::Context->userenv; > my $branchcode = $userenv->{branch} // q{}; > >- my $calendar = Koha::Calendar->new( branchcode => $branchcode ); >- my $today = dt_from_string(); >+ my $useDaysMode_value = Koha::CirculationRules->get_useDaysMode_effective_value( >+ { >+ categorycode => undef, >+ itemtype => undef, >+ branchcode => $branchcode, >+ } >+ ); >+ my $calendar = Koha::Calendar->new( branchcode => $branchcode, days_mode => $useDaysMode_value ); >+ my $today = dt_from_string; > my $dropbox_date = $calendar->addDate( $today, -1 ); > > return $dropbox_date; >-- >2.20.1
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 24159
:
99758
|
99759
|
99760
|
99761
|
99762
|
100608
|
100609
|
100610
|
100611
|
100612
|
100613
|
100614
|
100615
|
101053
|
101054
|
101556
|
101649
|
101698
|
102009
|
102148
|
102303
|
102554
|
102555
|
102556
|
102557
|
102558
|
102559
|
102560
|
102561
|
102562
|
102563
|
104197
|
104198
|
104199
|
104200
|
104201
|
104202
|
104203
|
104204
|
106007
|
106008
|
106013
|
106014
|
106015
|
106016
|
106017
|
106018
| 106019 |
106020
|
106021
|
106022