Bugzilla – Attachment 82286 Details for
Bug 21788
C4::Circulation::ProcessOfflinePayment should pass library_id to ->pay
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21788: Make ProcessOfflinePayment pass the library_id parameter
Bug-21788-Make-ProcessOfflinePayment-pass-the-libr.patch (text/plain), 1.38 KB, created by
Kyle M Hall (khall)
on 2018-11-13 15:01:26 UTC
(
hide
)
Description:
Bug 21788: Make ProcessOfflinePayment pass the library_id parameter
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-11-13 15:01:26 UTC
Size:
1.38 KB
patch
obsolete
>From 61ee312837354cef6777a0eb116e3ca0a0c34dd9 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 8 Nov 2018 12:34:17 -0300 >Subject: [PATCH] Bug 21788: Make ProcessOfflinePayment pass the library_id > parameter > >To test: >- Run: > $ kshell > k$ prove t/db_dependent/Circulation.t >=> FAIL: branchcode is not set >- Apply this patch >- Run: > $ kshell > k$ prove t/db_dependent/Circulation.t >=> SUCCESS: Tests pass! >- Sign off :-D > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Circulation.pm | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 951f65f662..2a2bcab255 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3837,15 +3837,13 @@ sub ProcessOfflineIssue { > sub ProcessOfflinePayment { > my $operation = shift; > >- my $patron = Koha::Patrons->find( { cardnumber => $operation->{cardnumber} }); >- my $amount = $operation->{amount}; >+ my $patron = Koha::Patrons->find({ cardnumber => $operation->{cardnumber} }); > >- Koha::Account->new( { patron_id => $patron->id } )->pay( { amount => $amount } ); >+ $patron->account->pay({ amount => $operation->{amount}, library_id => $operation->{branchcode} }); > >- return "Success." >+ return "Success."; > } > >- > =head2 TransferSlip > > TransferSlip($user_branch, $itemnumber, $barcode, $to_branch) >-- >2.17.2 (Apple Git-113)
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 21788
:
82094
|
82095
|
82285
|
82286
|
83721
|
83722