Bugzilla – Attachment 52135 Details for
Bug 15906
Remove use of makepayment in paycollect.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15906 - Remove use of makepayment in paycollect.pl
Bug-15906---Remove-use-of-makepayment-in-paycollec.patch (text/plain), 2.61 KB, created by
Kyle M Hall (khall)
on 2016-06-07 14:55:50 UTC
(
hide
)
Description:
Bug 15906 - Remove use of makepayment in paycollect.pl
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-06-07 14:55:50 UTC
Size:
2.61 KB
patch
obsolete
>From 21952e3544bfaa3af8fd8b3c35dd85e15c986b85 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 24 Feb 2016 15:51:07 +0000 >Subject: [PATCH] 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 >--- > members/paycollect.pl | 35 +++++++++++++++++++++++++++++++---- > 1 file changed, 31 insertions(+), 4 deletions(-) > >diff --git a/members/paycollect.pl b/members/paycollect.pl >index 7c1480f..56751e9 100755 >--- a/members/paycollect.pl >+++ b/members/paycollect.pl >@@ -110,8 +110,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 { > my $line = Koha::Account::Lines->find($accountlines_id); >@@ -134,8 +141,28 @@ if ( $total_paid and $total_paid ne '0.00' ) { > } > my @acc = split /,/, $select; > my $note = $input->param('selected_accts_notes'); >- recordpayment_selectaccts( $borrowernumber, $total_paid, \@acc, $note ); >- } else { >+ >+ my @lines = Koha::Account::Lines->search( >+ { >+ borrowernumber => $borrowernumber, >+ accountno => { 'IN' => \@acc }, >+ }, >+ { order_by => 'date' } >+ ); >+ >+ return Koha::Account->new( >+ { >+ patron_id => $borrowernumber, >+ } >+ )->pay( >+ { >+ amount => $total_paid, >+ lines => \@lines, >+ note => $note, >+ } >+ ); >+ } >+ else { > my $note = $input->param('selected_accts_notes'); > Koha::Account->new( { patron_id => $borrowernumber } ) > ->pay( { amount => $total_paid, note => $note } ); >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15906
:
48347
|
52135
|
52148
|
54172
|
57168
|
57169