Bugzilla – Attachment 80358 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), 1.03 KB, created by
Josef Moravec
on 2018-10-10 14:59:58 UTC
(
hide
)
Description:
Bug 21401: Take transaction library from userenv when not defined
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-10-10 14:59:58 UTC
Size:
1.03 KB
patch
obsolete
>From 846a3025143c1cf8f7609a611c1b12da7edf1319 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 >--- > Koha/Account/Line.pm | 11 +++++++++++ > 1 file changed, 11 insertions(+) > >diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm >index 9cf8867..5297867 100644 >--- a/Koha/Account/Line.pm >+++ b/Koha/Account/Line.pm >@@ -37,8 +37,19 @@ Koha::Account::Line - Koha accountline Object class > > =head2 Class methods > >+=head3 new >+ >+Creates and returns new object, when there is no branchcode param, it is set to active userenv branchcode >+ > =cut > >+sub new { >+ my ($class, $params) = @_; >+ $params->{ branchcode } //= >+ defined C4::Context->userenv ? C4::Context->userenv->{branch} : undef; >+ return $class->SUPER::new($params); >+} >+ > =head3 item > > Return the item linked to this account line if exists >-- >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