Browse Source

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 <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
17.05.x
Josef Moravec 7 years ago
committed by Kyle M Hall
parent
commit
0b2393cd65
  1. 32
      members/paycollect.pl

32
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 {

Loading…
Cancel
Save