Bugzilla – Attachment 83722 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.41 KB, created by
Josef Moravec
on 2019-01-08 18:11:25 UTC
(
hide
)
Description:
Bug 21788: Make ProcessOfflinePayment pass the library_id parameter
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2019-01-08 18:11:25 UTC
Size:
1.41 KB
patch
obsolete
>From f05e7bd58216c2028d149c63e12e23b369f3a170 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> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > C4/Circulation.pm | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 0a0680e..a544bc2 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3841,15 +3841,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.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 21788
:
82094
|
82095
|
82285
|
82286
|
83721
| 83722