Bugzilla – Attachment 136415 Details for
Bug 17983
Add minutes loan to DiscreteCalendar
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17983: Add minutes loan to DiscreteCalendar
Bug-17983-Add-minutes-loan-to-DiscreteCalendar.patch (text/plain), 1.55 KB, created by
Shi Yao Wang
on 2022-06-22 13:24:50 UTC
(
hide
)
Description:
Bug 17983: Add minutes loan to DiscreteCalendar
Filename:
MIME Type:
Creator:
Shi Yao Wang
Created:
2022-06-22 13:24:50 UTC
Size:
1.55 KB
patch
obsolete
>From 92215dfafca514feeb75cb19028f82ad521000a1 Mon Sep 17 00:00:00 2001 >From: Shi Yao Wang <shiyao@inlibro.com> >Date: Fri, 18 Mar 2022 14:57:43 -0400 >Subject: [PATCH] Bug 17983: Add minutes loan to DiscreteCalendar > >This is an additional feature to our new Discrete Calendar. >Theses patches add the possibility to choose the loan unit as minutes in circulations rules. > >Test plan: >- Apply patch of Bugzilla 17015 >- Apply this patch. >- Run test t/db_dependent/minutes_loan.t >- Create new item type for the new rule. >- Create circulation rule and fill the fields, make sure the unit is set to : minutes, choose the item type of the one created above.- >- Checkout an item that follow the circulation rule and set due date in the past. > >- Run fines.pl. >- Check if the correct amount was calculated. > - Note: make sure to factor in the fine grace period if set and the system preference FinesIncludeGracePeriod.fixed patch tests and minor adjustments >--- > C4/Circulation.pm | 1 - > 1 file changed, 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index d505d54dfd..b9a3525ccf 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3791,7 +3791,6 @@ sub CalcDateDue { > else { # days > $dur = DateTime::Duration->new( days => $loanlength->{$length_key}); > } >- ##my $calendar = Koha::DiscreteCalendar->new({ branchcode => $branch, days_mode => $daysmode }); > $datedue = $calendar->addDuration( $datedue, $dur, $loanlength->{lengthunit} ); > if ($loanlength->{lengthunit} eq 'days') { > $datedue->set_hour(23); >-- >2.25.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 17983
:
59521
|
59522
|
59523
|
67880
|
67881
|
67882
|
67969
|
68016
|
68017
|
73353
|
73354
|
73355
|
75480
|
131929
|
131930
|
131931
|
131932
|
136414
|
136415
|
139519
|
144267
|
151452
|
167846