From f3abb1ace539ce7e68e414400d2c6ba2842dd248 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Sun, 7 Jan 2018 13:48:16 -0300 Subject: [PATCH] Bug 19933: Remove patronflags - In CanBookBeIssued The change is trivial here, we only want to pass gonenoaddress, lost and is_debared to the template. Signed-off-by: Kyle M Hall Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- C4/Circulation.pm | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index d583e5372c..d150ce1e30 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -724,17 +724,15 @@ sub CanBookBeIssued { return( { STATS => 1 }, {}); } - my $flags = C4::Members::patronflags( $patron_unblessed ); - if ( ref $flags ) { - if ( $flags->{GNA} ) { - $issuingimpossible{GNA} = 1; - } - if ( $flags->{'LOST'} ) { - $issuingimpossible{CARD_LOST} = 1; - } - if ( $flags->{'DBARRED'} ) { - $issuingimpossible{DEBARRED} = 1; - } + if ( $patron->gonenoaddress == 1 ) { + $issuingimpossible{GNA} = 1; + } + + if ( $patron->lost == 1 ) { + $issuingimpossible{CARD_LOST} = 1; + } + if ( $patron->is_debarred ) { + $issuingimpossible{DEBARRED} = 1; } if ( $patron->is_expired ) { -- 2.39.5