bug 12920 - Remove AllowRenewalLimitOverride from pl scripts and tt files, use Koha...
[koha-ffzg.git] / members / paycollect.pl
index 7254a3a..8a32040 100755 (executable)
@@ -48,8 +48,7 @@ my $borrowernumber = $input->param('borrowernumber');
 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');
@@ -175,10 +174,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);