From ed332ec895ee2d7a0b2b6b26bedec3fca640e0f1 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Wed, 1 Feb 2017 20:48:49 +0100 Subject: [PATCH] Bug 18033: Remove duplicate code in paycollect.pl Test plan: 0) apply the patch 1) try to pay individual fee, with full amount and partial amount it should work the same as before patch Signed-off-by: Kyle M Hall --- members/paycollect.pl | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/members/paycollect.pl b/members/paycollect.pl index a76f007..ac1c281 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -111,29 +111,15 @@ if ( $total_paid and $total_paid ne '0.00' ) { ); } else { if ($individual) { - if ( $total_paid == $total_due ) { - my $line = Koha::Account::Lines->find($accountlines_id); - Koha::Account->new( { patron_id => $borrowernumber } )->pay( - { - lines => [$line], - amount => $total_paid, - library_id => $branch, - note => $payment_note - } - ); - } - else { - my $line = Koha::Account::Lines->find($accountlines_id); - - Koha::Account->new( { patron_id => $borrowernumber, } )->pay( - { - amount => $total_paid, - lines => [$line], - note => $payment_note, - library_id => $branch, - } - ); - } + my $line = Koha::Account::Lines->find($accountlines_id); + Koha::Account->new( { patron_id => $borrowernumber } )->pay( + { + lines => [$line], + amount => $total_paid, + library_id => $branch, + note => $payment_note + } + ); print $input->redirect( "/cgi-bin/koha/members/pay.pl?borrowernumber=$borrowernumber"); } else { -- 2.1.4