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>
);
} 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 {