Bugzilla – Attachment 58227 Details for
Bug 14784
Missing checkin message for debarred patrons when issuing rules 'fine days = 0'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug14784 - Fix checkin message for debarred patrons
Bug14784---Fix-checkin-message-for-debarred-patron.patch (text/plain), 2.13 KB, created by
Bouzid Fergani
on 2016-12-15 17:33:06 UTC
(
hide
)
Description:
Bug14784 - Fix checkin message for debarred patrons
Filename:
MIME Type:
Creator:
Bouzid Fergani
Created:
2016-12-15 17:33:06 UTC
Size:
2.13 KB
patch
obsolete
>From 953d362f3823cfeca3bfa8c74855435d6299308f Mon Sep 17 00:00:00 2001 >From: Bouzid Fergani <bouzid.fergani@inlibro.com> >Date: Thu, 15 Dec 2016 12:22:28 -0500 >Subject: [PATCH] Bug14784 - Fix checkin message for debarred patrons > >Hi All, > According to my tests, the bug exist always > Before apply patch: > Scenario 1: > 1. Choose one borrower who have not a fines > 2. Checkout one document for this borrower(Example : choose return date 10 days after) > 3. Add restriction for this borrower (Example : 2 days after checkin). > 4. When Checkin in "cgi-bin/koha/circ/returns.pl" this document, you see a message in red : > Reminder: Patron was earlier restricted until <......>. > Scenario 2: > 1. Choose one borrower who have a fines > 2. Checkout one document for this borrower > 3. Add restriction for this borrower > 4. When Checkin in "cgi-bin/koha/circ/returns.pl" this document, you haven't the message: Reminder: Patron was earlier restricted until <......> , just a message of fines. > when apply patch, you have the message in all situations when borrower is debarred >--- > C4/Circulation.pm | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 863b6be..026b0e4 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2010,6 +2010,14 @@ sub AddReturn { > if ( $issue->{overdue} && $issue->{date_due} ) { > # fix fine days > $today = $dropboxdate if $dropbox; >+ if ($borrower->{debarred}){ >+ my $borrower_debar_dt = dt_from_string( $borrower->{debarred} ); >+ $borrower_debar_dt->truncate(to => 'day'); >+ my $today_dt = $today->clone()->truncate(to => 'day'); >+ if ( DateTime->compare( $borrower_debar_dt, $today_dt ) != -1 ) { >+ $messages->{'PrevDebarred'} = $borrower->{'debarred'}; >+ } >+ } > my ($debardate,$reminder) = _debar_user_on_return( $borrower, $item, $issue->{date_due}, $today ); > if ($reminder){ > $messages->{'PrevDebarred'} = $debardate; >-- >1.9.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 14784
:
42354
|
49282
|
49283
|
49377
|
58227
|
67102
|
68132
|
69295
|
69296
|
77683
|
79826
|
106808
|
106809
|
107487
|
110485
|
110514
|
110763
|
110764
|
112724
|
112725
|
136040
|
136327
|
137727
|
137728
|
145320
|
145321