Bugzilla – Attachment 82474 Details for
Bug 19066
Add branchcode to accountlines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19066: (QA follow-up) Add handling in add_credit
Bug-19066-QA-follow-up-Add-handling-in-addcredit.patch (text/plain), 2.47 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-11-19 12:23:22 UTC
(
hide
)
Description:
Bug 19066: (QA follow-up) Add handling in add_credit
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-11-19 12:23:22 UTC
Size:
2.47 KB
patch
obsolete
>From cc31daf13926c2caba23c4b23d082ac51cfc7093 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 2 Nov 2018 15:10:44 +0000 >Subject: [PATCH] Bug 19066: (QA follow-up) Add handling in add_credit > >--- > C4/Circulation.pm | 4 +++- > Koha/Account.pm | 6 +++++- > 2 files changed, 8 insertions(+), 2 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 599b100c55..3ccabd5d20 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2424,12 +2424,14 @@ sub _FixAccountForLostAndReturned { > : 0; > > if ( $total_to_refund > 0 ) { >+ my $branchcode = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; > my $account = Koha::Patrons->find( $accountline->borrowernumber )->account; > $credit = $account->add_credit( > { > amount => $total_to_refund, > description => 'Item Returned ' . $item_id, >- type => 'lost_item_return' >+ type => 'lost_item_return', >+ library_id => $branchcode, > } > ); > } >diff --git a/Koha/Account.pm b/Koha/Account.pm >index df1677788f..3aec6a26e4 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -352,6 +352,7 @@ sub add_credit { > # Insert the account line > $line = Koha::Account::Line->new( > { borrowernumber => $self->{patron_id}, >+ accountno => $accountno, > date => \'NOW()', > amount => $amount, > description => $description, >@@ -360,7 +361,9 @@ sub add_credit { > payment_type => $payment_type, > note => $note, > manager_id => $user_id, >- itemnumber => $item_id >+ branchcode => $library_id, >+ itemnumber => $item_id, >+ lastincrement => undef, > } > )->store(); > >@@ -396,6 +399,7 @@ sub add_credit { > note => $note, > itemnumber => $item_id, > manager_id => $user_id, >+ branchcode => $library_id, > } > ) > ); >-- >2.19.1
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 19066
:
65769
|
65770
|
65771
|
67756
|
67757
|
71153
|
71154
|
71155
|
73185
|
73186
|
73187
|
73595
|
77281
|
77282
|
77283
|
78900
|
78901
|
81144
|
81145
|
81146
|
81253
|
81254
|
81255
|
81684
|
81912
|
81918
|
82047
|
82048
|
82084
|
82086
|
82087
|
82469
|
82470
|
82471
|
82473
|
82474
|
82475
|
82476
|
82477
|
82478
|
83067
|
83068
|
83069
|
83070
|
83071
|
83072
|
83073
|
83074
|
83075
|
83076
|
83077
|
83078
|
83079
|
83080
|
83081
|
83082
|
83083
|
83084
|
83275
|
83519
|
83520
|
83521
|
83522
|
83523
|
83524
|
83525
|
83526
|
83527
|
83528
|
83628