Bug 15353: Display the patron image where needed

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 <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit bb0c2fce1b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 64eb1f88ea)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
Jonathan Druart 2016-01-05 14:37:20 +00:00 committed by Frédéric Demians
parent 1692d597e2
commit dead28ef19
3 changed files with 9 additions and 4 deletions

View File

@ -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'},

View File

@ -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;

View File

@ -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);