my $borrower = GetMember( borrowernumber => $borrowernumber );
my $user = $input->remote_user;
-# get account details
-my $branch = GetBranch( $input, GetBranches() );
+my $branch = C4::Context->userenv->{'branch'};
my ( $total_due, $accts, $numaccts ) = GetMemberAccountRecords($borrowernumber);
my $total_paid = $input->param('paid');
} 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);