Bugzilla – Attachment 172305 Details for
Bug 17976
TT syntax for notices - Add an equivalence for items.fine
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17976: Add overdue_fines accessor to Koha::Checkout
Bug-17976-Add-overduefines-accessor-to-KohaCheckou.patch (text/plain), 1.29 KB, created by
Emily Lamancusa (emlam)
on 2024-10-02 13:58:23 UTC
(
hide
)
Description:
Bug 17976: Add overdue_fines accessor to Koha::Checkout
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2024-10-02 13:58:23 UTC
Size:
1.29 KB
patch
obsolete
>From 8ef0776e3ddff317e1bd7d9412ce109217c350a7 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 1 Oct 2024 15:55:06 +0100 >Subject: [PATCH] Bug 17976: Add overdue_fines accessor to Koha::Checkout > >This patch adds a new filtered relation accessor to the Koha::Checkout >object to return just overdue fine type account lines related to the >checkout. > >Whilst this is easy to chain in code, it's not available via TT and so >this accessor is useful for the notices case. > >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >--- > Koha/Checkout.pm | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > >diff --git a/Koha/Checkout.pm b/Koha/Checkout.pm >index a63ec71ab8..c22917de57 100644 >--- a/Koha/Checkout.pm >+++ b/Koha/Checkout.pm >@@ -93,6 +93,20 @@ sub account_lines { > return Koha::Account::Lines->_new_from_dbic( $account_lines_rs ); > } > >+=head3 overdue_fines >+ >+ my $fines = $checkout->overdue_fines; >+ >+Return the account lines for just the overdue fines >+ >+=cut >+ >+sub overdue_fines { >+ my ( $self ) = @_; >+ my $account_lines_rs = $self->_result->account_lines->search( { debit_type_code => 'OVERDUE' } ); >+ return Koha::Account::Lines->_new_from_dbic( $account_lines_rs ); >+} >+ > =head3 library > > my $library = $checkout->library; >-- >2.34.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 17976
:
172277
|
172278
|
172283
|
172304
|
172305
|
172306
|
172328
|
172329
|
172330
|
172331
|
174324