Bugzilla – Attachment 81306 Details for
Bug 21681
Remove C4::Accounts::getcharges
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21681: (follow-up) Don't use Koha::Account::Line directly
Bug-21681-follow-up-Dont-use-KohaAccountLine-direc.patch (text/plain), 1.50 KB, created by
Martin Renvoize (ashimema)
on 2018-10-26 15:24:10 UTC
(
hide
)
Description:
Bug 21681: (follow-up) Don't use Koha::Account::Line directly
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-10-26 15:24:10 UTC
Size:
1.50 KB
patch
obsolete
>From 721e215c0ef45ac3341c80d267f9d8f1488033a8 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 26 Oct 2018 16:23:07 +0100 >Subject: [PATCH] Bug 21681: (follow-up) Don't use Koha::Account::Line directly > >--- > C4/ILSDI/Services.pm | 5 +---- > Koha/Account.pm | 20 ++++++++++++++++++++ > 2 files changed, 21 insertions(+), 4 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 08e9e1d420..53465caa9d 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -426,10 +426,7 @@ sub GetPatronInfo { > # Fines management > if ( $cgi->param('show_fines') && $cgi->param('show_fines') eq "1" ) { > >- my $account_lines = Koha::Account::Lines->search({ >- borrowernumber => $patron->borrowernumber, >- }); >- >+ my $account_lines = $patron->account->lines; > while (my $line = $account_lines->next ) { > push @{ $borrower->{fines}{fine} }, $line->unblessed; > } >diff --git a/Koha/Account.pm b/Koha/Account.pm >index e6863979fd..ca7a8072d1 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -524,6 +524,26 @@ sub non_issues_charges { > : 0; > } > >+=head3 lines >+ >+my $lines = $self->lines; >+ >+Return all credits and debits for the user, outstanding or otherwise >+ >+=cut >+ >+sub lines { >+ my ($self) = @_; >+ >+ my $lines = Koha::Account::Lines->search( >+ { >+ borrowernumber => $self->{patron_id}, >+ } >+ ); >+ >+ return $lines; >+} >+ > 1; > > =head2 Name mappings >-- >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 21681
:
81269
|
81298
|
81306
|
81322
|
81325
|
81326
|
81327
|
81329
|
81330
|
81331