Bug 15906 - Remove use of makepayment in paycollect.pl
Test plan: 1) Apply this patch 2) Make a payment in full using the "Pay" button 3) Note payment succeeds Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
427ba8b0c7
commit
e716299c32
1 changed files with 9 additions and 2 deletions
|
@ -112,8 +112,15 @@ if ( $total_paid and $total_paid ne '0.00' ) {
|
|||
} else {
|
||||
if ($individual) {
|
||||
if ( $total_paid == $total_due ) {
|
||||
makepayment( $accountlines_id, $borrowernumber, $accountno, $total_paid, $user,
|
||||
$branch, $payment_note );
|
||||
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 {
|
||||
makepartialpayment( $accountlines_id, $borrowernumber, $accountno, $total_paid,
|
||||
$user, $branch, $payment_note );
|
||||
|
|
Loading…
Reference in a new issue