From 22d5373d78656ee95b5b79d089e6c904e653889d Mon Sep 17 00:00:00 2001
From: Andrew Nugged <nugged@gmail.com>
Date: Thu, 10 Feb 2022 01:16:23 +0200
Subject: [PATCH] Bug 29684: (QA follow-up) paycollect.pl don't needs
 borrower_data at all

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
---
 koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt | 4 ++--
 members/paycollect.pl                                         | 3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt
index a7518f86a87..d2246e4a1a6 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt
@@ -124,7 +124,7 @@
     <input type="hidden" name="amount" id="amount" value="[% amount | html %]" />
     <input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding | html %]" />
     <input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id | html %]" />
-    <input type="hidden" name="title" id="title" value="[% borrower_data.title | html %]" />
+    <input type="hidden" name="title" id="title" value="[% patron.title | html %]" />
     <input type="hidden" name="change_given" id="change_given" />
 
 <fieldset class="rows">
@@ -203,7 +203,7 @@
     <input type="hidden" name="debit_type_code" id="debit_type_code" value="[% debit_type_code | html %]" />
     <input type="hidden" name="amount" id="amount" value="[% amount | html %]" />
     <input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id | html %]" />
-    <input type="hidden" name="title" id="title" value="[% borrower_data.title | html %]" />
+    <input type="hidden" name="title" id="title" value="[% patron.title | html %]" />
     <input type="hidden" name="payment_note" id="payment_note" value="[% payment_note | html %]" />
     <input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding | html %]" />
     <input type="hidden" name="confirm_writeoff" id="confirm_writeoff" value="1" />
diff --git a/members/paycollect.pl b/members/paycollect.pl
index c262869b861..3f6d1f4c8ba 100755
--- a/members/paycollect.pl
+++ b/members/paycollect.pl
@@ -57,7 +57,6 @@ my $logged_in_user = Koha::Patrons->find( $loggedinuser );
 my $patron         = Koha::Patrons->find( $borrowernumber );
 output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
 
-my $borrower       = $patron->unblessed;
 my $account        = $patron->account;
 my $category       = $patron->category;
 my $user           = $input->remote_user;
@@ -239,8 +238,6 @@ if ( $total_paid and $total_paid ne '0.00' ) {
     $total_paid = '0.00';    #TODO not right with pay_individual
 }
 
-$template->param(borrower_data => $borrower);
-
 if ( $input->param('error_over') ) {
     $template->param( error_over => 1, total_due => scalar $input->param('amountoutstanding') );
 }
-- 
2.25.1