Bugzilla – Attachment 79284 Details for
Bug 21401
Account offsets should save the transacting library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21401: Take transaction library from userenv when not defined
Bug-21401-Take-transaction-library-from-userenv-wh.patch (text/plain), 997 bytes, created by
Michal Denar
on 2018-09-24 09:42:47 UTC
(
hide
)
Description:
Bug 21401: Take transaction library from userenv when not defined
Filename:
MIME Type:
Creator:
Michal Denar
Created:
2018-09-24 09:42:47 UTC
Size:
997 bytes
patch
obsolete
>From 4b8f92a7565f03f4074c0a6a5a176d7d109339f8 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Mon, 24 Sep 2018 07:45:08 +0000 >Subject: [PATCH] Bug 21401: Take transaction library from userenv when not > defined > >Test plan: >1) Apply the patch >2) Run database update >3) prove t/db_dependent/Account.t > >Signed-off-by: Michal Denar <black23@gmail.com> >--- > Koha/Account/Offset.pm | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > >diff --git a/Koha/Account/Offset.pm b/Koha/Account/Offset.pm >index f456d16..7b64338 100644 >--- a/Koha/Account/Offset.pm >+++ b/Koha/Account/Offset.pm >@@ -36,6 +36,19 @@ Account offsets are used to track the changes in account lines > > =cut > >+=head3 new >+ >+=cut >+ >+sub new { >+ my ($class, $params) = @_; >+ >+ $params->{transaction_library} //= >+ defined C4::Context->userenv ? C4::Context->userenv->{branch} : undef; >+ >+ return $class->SUPER::new($params); >+} >+ > =head3 debit > > my $debit = $account_offset->debit; >-- >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 21401
:
79272
|
79273
|
79274
|
79275
|
79284
|
79285
|
79286
|
79287
|
79288
|
79688
|
80355
|
80356
|
80357
|
80358