From dead28ef19bffe1e3fa8dd8abb5cea4a6e3ed091 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 5 Jan 2016 14:37:20 +0000 Subject: [PATCH] Bug 15353: Display the patron image where needed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit On the 3 following pages, the patron image was not displayed: members/discharge.pl members/pay.pl members/paycollect.pl Test plan: Apply this patch and confirm the image is now displayed Followed test plan, image displays as expected. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com (cherry picked from commit bb0c2fce1b87222933bfa5dd02ca614521ba2a0c) Signed-off-by: Julian Maurice (cherry picked from commit 64eb1f88ea741ca06b0a17bf4186ad25c7487f81) Signed-off-by: Frédéric Demians --- members/discharge.pl | 3 +++ members/pay.pl | 3 +++ members/paycollect.pl | 7 +++---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/members/discharge.pl b/members/discharge.pl index 2144af9e51..6e73f71fb0 100755 --- a/members/discharge.pl +++ b/members/discharge.pl @@ -98,6 +98,9 @@ if ( $input->param('borrowernumber') ) { } } + my ($picture, $dberror) = GetPatronImage($borrowernumber); + $template->param( picture => 1 ) if $picture; + $template->param( borrowernumber => $borrowernumber, biblionumber => $data->{'biblionumber'}, diff --git a/members/pay.pl b/members/pay.pl index d541b0bd2f..62d810e19d 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -136,6 +136,8 @@ sub add_accounts_to_template { $template->param(%$borrower); + my ($picture, $dberror) = GetPatronImage($borrower->{'borrowernumber'}); + $template->param( picture => 1 ) if $picture; $template->param( accounts => $accounts, borrower => $borrower, @@ -226,6 +228,7 @@ sub borrower_add_additional_fields { } elsif ( $b_ref->{category_type} eq 'A' ) { $b_ref->{adultborrower} = 1; } + my ( $picture, $dberror ) = GetPatronImage( $b_ref->{borrowernumber} ); if ($picture) { $b_ref->{has_picture} = 1; diff --git a/members/paycollect.pl b/members/paycollect.pl index 35b912143e..b71f669aca 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -175,10 +175,9 @@ sub borrower_add_additional_fields { } elsif ( $b_ref->{category_type} eq 'A' ) { $b_ref->{adultborrower} = 1; } - my ( $picture, $dberror ) = GetPatronImage( $b_ref->{borrowernumber} ); - if ($picture) { - $b_ref->{has_picture} = 1; - } + + my ($picture, $dberror) = GetPatronImage($borrower->{'borrowernumber'}); + $template->param( picture => 1 ) if $picture; if (C4::Context->preference('ExtendedPatronAttributes')) { $b_ref->{extendedattributes} = GetBorrowerAttributes($borrowernumber); -- 2.39.5