Bugzilla – Attachment 11958 Details for
Bug 8236
Prevent renewing if overdue or restriction
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Block renewal if any checked out book is late
0001-Block-renewal-if-any-checked-out-book-is-late.patch (text/plain), 2.54 KB, created by
Koha Team University Lyon 3
on 2012-09-04 13:52:37 UTC
(
hide
)
Description:
Block renewal if any checked out book is late
Filename:
MIME Type:
Creator:
Koha Team University Lyon 3
Created:
2012-09-04 13:52:37 UTC
Size:
2.54 KB
patch
obsolete
>From 3d8a57081993e17ee6b489ca8b44dd4c5cedd9f7 Mon Sep 17 00:00:00 2001 >From: Lyon3 Team <koha@univ-lyon3.fr> >Date: Tue, 4 Sep 2012 14:32:52 +0200 >Subject: [PATCH] Block renewal if any checked out book is late > >a patron can't renew whatever of his checked out books if any of them is late or if he's restricted >The renewal remains nevertheless possible checking the Override renewal limit case >--- > C4/Circulation.pm | 8 ++++++++ > .../prog/en/modules/circ/circulation.tt | 12 ++++++++++++ > 2 files changed, 20 insertions(+), 0 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 85d6b3b..8e1a345 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2327,6 +2327,14 @@ sub CanBookBeRenewed { > } > > } >+ my ( $blocktype, $count ) = C4::Members::IsMemberBlocked($borrowernumber); >+ if ( $blocktype == -1 && ! $override_limit ) { >+ $renewokay=0; >+ $error="overdue"; >+ } elsif ( $blocktype == 1 && ! $override_limit ) { >+ $renewokay=0; >+ $error="restriction"; >+ } > return ($renewokay,$error); > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index e79cef1..1bab064 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -757,6 +757,12 @@ No patron matched <span class="ex">[% message %]</span> > [% IF ( todayissue.renew_error_too_many ) %] > Not renewable > [% END %] >+ [% IF ( todayissue.renew_error_overdue ) %] >+ Overdues >+ [% END %] >+ [% IF ( todayissue.renew_error_restriction ) %] >+ Patron is restricted >+ [% END %] > [% IF ( todayissue.can_confirm ) %] > </span> > [% END %] >@@ -832,6 +838,12 @@ No patron matched <span class="ex">[% message %]</span> > [% IF ( previssue.renew_error_too_many ) %] > Not renewable > [% END %] >+ [% IF ( previssue.renew_error_overdue ) %] >+ Not Renewable (Overdue) >+ [% END %] >+ [% IF ( previssue.renew_error_restriction ) %] >+ Patron is restricted >+ [% END %] > [% IF ( previssue.can_confirm ) %] > </span> > [% END %] >-- >1.7.2.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 8236
:
10230
|
11958
|
12362
|
12619
|
12727
|
12790
|
12791
|
13510
|
14433
|
17926
|
18071
|
18073
|
18507
|
18729
|
20716
|
20719
|
21163
|
21223
|
22264
|
22275
|
22280
|
34234
|
34322
|
35372
|
36674
|
36743
|
37407
|
37418
|
37457
|
37458
|
37459
|
41992
|
41993
|
41994
|
42007
|
43628