Bugzilla – Attachment 54742 Details for
Bug 15900
Remove use of recordpayment in ProcessOfflinePayment
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15900 - Remove use of recordpayment in ProcessOfflinePayment
Bug-15900---Remove-use-of-recordpayment-in-Process.patch (text/plain), 1.30 KB, created by
Josef Moravec
on 2016-08-23 06:14:27 UTC
(
hide
)
Description:
Bug 15900 - Remove use of recordpayment in ProcessOfflinePayment
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2016-08-23 06:14:27 UTC
Size:
1.30 KB
patch
obsolete
>From 1f0d194b9a2cc297d007bc656d94ab95778faa0b Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 24 Feb 2016 15:11:53 +0000 >Subject: [PATCH] Bug 15900 - Remove use of recordpayment in > ProcessOfflinePayment > >Test plan: >1) Apply this patch >2) prove t/db_dependent/Circulation.t > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > C4/Circulation.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 1304d11..693514c 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -45,6 +45,7 @@ use C4::RotatingCollections qw(GetCollectionItemBranches); > use Algorithm::CheckDigits; > > use Data::Dumper; >+use Koha::Account; > use Koha::DateUtils; > use Koha::Calendar; > use Koha::Items; >@@ -3854,10 +3855,10 @@ sub ProcessOfflineIssue { > sub ProcessOfflinePayment { > my $operation = shift; > >- my $borrower = C4::Members::GetMemberDetails( undef, $operation->{cardnumber} ); # Get borrower from operation cardnumber >+ my $patron = Koha::Borrowers->find( { cardnumber => $operation->{cardnumber} }); > my $amount = $operation->{amount}; > >- recordpayment( $borrower->{borrowernumber}, $amount ); >+ Koha::Account->new( { patron_id => $patron->id } )->pay( { amount => $amount } ); > > return "Success." > } >-- >2.1.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 15900
:
48337
|
52142
|
54742
|
55261
|
55872
|
55873