Bug 11490: Split MaxItemsForBatch into 2 prefs to clarify things
[srvgit] / members / pay.pl
index f1025f4..8747dfa 100755 (executable)
@@ -41,6 +41,7 @@ use C4::Koha;
 use C4::Overdues;
 use C4::Branch;
 use C4::Members::Attributes qw(GetBorrowerAttributes);
+use Koha::Patron::Images;
 
 our $input = CGI->new;
 
@@ -135,8 +136,8 @@ sub add_accounts_to_template {
 
     $template->param(%$borrower);
 
-    my ($picture, $dberror) = GetPatronImage($borrower->{'borrowernumber'});
-    $template->param( picture => 1 ) if $picture;
+    my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber});
+    $template->param( picture => 1 ) if $patron_image;
     $template->param(
         accounts => $accounts,
         borrower => $borrower,
@@ -172,6 +173,7 @@ sub redirect_to_paycollect {
     $redirect .= get_for_redirect( 'amount', "amount$line_no", 1 );
     $redirect .=
       get_for_redirect( 'amountoutstanding', "amountoutstanding$line_no", 1 );
+    $redirect .= get_for_redirect( 'description',    "description$line_no",    0 );
     $redirect .= get_for_redirect( 'title',        "title$line_no",        0 );
     $redirect .= get_for_redirect( 'itemnumber',   "itemnumber$line_no",   0 );
     $redirect .= get_for_redirect( 'notify_id',    "notify_id$line_no",    0 );
@@ -226,11 +228,6 @@ sub borrower_add_additional_fields {
         $b_ref->{adultborrower} = 1;
     }
 
-    my ( $picture, $dberror ) = GetPatronImage( $b_ref->{borrowernumber} );
-    if ($picture) {
-        $b_ref->{has_picture} = 1;
-    }
-
     if (C4::Context->preference('ExtendedPatronAttributes')) {
         $b_ref->{extendedattributes} = GetBorrowerAttributes($borrowernumber);
         $template->param(