Bugzilla – Attachment 83523 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.39 KB, created by
Alex Arnaud
on 2018-12-27 14:08:15 UTC
(
hide
)
Description:
Bug 19066: (QA follow-up) Add handling in add_credit
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2018-12-27 14:08:15 UTC
Size:
2.39 KB
patch
obsolete
>From 8e66dfd282b7584519debd61cf8a10529274d92e 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 > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > 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 483a104..0a0680e 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2429,10 +2429,12 @@ sub _FixAccountForLostAndReturned { > my $credit_total = $accountline->amountoutstanding + $total_to_refund; > > if ( $credit_total > 0 ) { >+ my $branchcode = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; > $credit = $account->add_credit( > { amount => $credit_total, > 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 04ca0e8..1621104 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.7.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 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