Bugzilla – Attachment 4277 Details for
Bug 6328
Fine in days does not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix for comment 23 (4th follow-up)
0001-BZ6328-follow-up-3.patch (text/plain), 2.91 KB, created by
Paul Poulain
on 2011-05-27 13:20:36 UTC
(
hide
)
Description:
fix for comment 23 (4th follow-up)
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2011-05-27 13:20:36 UTC
Size:
2.91 KB
patch
obsolete
>From 6e03204948eb9cd7c2b4504cf34644305724e10a Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Fri, 27 May 2011 15:19:28 +0200 >Subject: [PATCH] BZ6328 follow-up 3 > >Fixes comment 23 from Fernando L. Canizo : when the patron was debarred and debar removed >he still could not check-out. > >The changes in the IsMemberBlocked (that were on biblibre/master) were lost somewhere >The sub was still checking for old_issues instead of calling CheckBorrowerDebarred >to get a debardate if applicable > >Note : this bug was appearing only is you had issuing rules defined for itemtype/categorycode/branch. >Seemed to work if you had only default rules. That's probably why it hadn't been spotted before >--- > C4/Members.pm | 37 +++++-------------------------------- > 1 files changed, 5 insertions(+), 32 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index ddbf021..8e57fb1 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -659,39 +659,12 @@ sub IsMemberBlocked { > my $borrowernumber = shift; > my $dbh = C4::Context->dbh; > >- # does patron have current fine days? >- my $strsth=qq{ >- SELECT >- ADDDATE(returndate, finedays * DATEDIFF(returndate,date_due) ) AS blockingdate, >- DATEDIFF(ADDDATE(returndate, finedays * DATEDIFF(returndate,date_due)),NOW()) AS blockedcount >- FROM old_issues >- }; >- if(C4::Context->preference("item-level_itypes")){ >- $strsth.= >- qq{ LEFT JOIN items ON (items.itemnumber=old_issues.itemnumber) >- LEFT JOIN issuingrules ON (issuingrules.itemtype=items.itype)} >- }else{ >- $strsth .= >- qq{ LEFT JOIN items ON (items.itemnumber=old_issues.itemnumber) >- LEFT JOIN biblioitems ON (biblioitems.biblioitemnumber=items.biblioitemnumber) >- LEFT JOIN issuingrules ON (issuingrules.itemtype=biblioitems.itemtype) }; >- } >- $strsth.= >- qq{ WHERE finedays IS NOT NULL >- AND date_due < returndate >- AND borrowernumber = ? >- ORDER BY blockingdate DESC, blockedcount DESC >- LIMIT 1}; >- my $sth=$dbh->prepare($strsth); >- $sth->execute($borrowernumber); >- my $row = $sth->fetchrow_hashref; >- my $blockeddate = $row->{'blockeddate'}; >- my $blockedcount = $row->{'blockedcount'}; >+ my $blockeddate = CheckBorrowerDebarred($borrowernumber); > >- return (1, $blockedcount) if $blockedcount > 0; >+ return ( 1, $blockeddate ) if $blockeddate; > > # if he have late issues >- $sth = $dbh->prepare( >+ my $sth = $dbh->prepare( > "SELECT COUNT(*) as latedocs > FROM issues > WHERE borrowernumber = ? >@@ -700,9 +673,9 @@ sub IsMemberBlocked { > $sth->execute($borrowernumber); > my $latedocs = $sth->fetchrow_hashref->{'latedocs'}; > >- return (-1, $latedocs) if $latedocs > 0; >+ return ( -1, $latedocs ) if $latedocs > 0; > >- return (0, 0); >+ return ( 0, 0 ); > } > > =head2 GetMemberIssuesAndFines >-- >1.7.4.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 6328
:
4074
|
4098
|
4152
|
4153
|
4154
|
4155
|
4156
|
4186
|
4187
|
4188
|
4277
|
5283
|
5561
|
5841
|
6019
|
6421
|
6429
|
7248