Bugzilla – Attachment 139690 Details for
Bug 25812
Fines can be displayed on SIP checkin/checkout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25812: Display overdue fines for the item on SIP checkin.
Bug-25812-Display-overdue-fines-for-the-item-on-SI.patch (text/plain), 1.72 KB, created by
Martin Renvoize (ashimema)
on 2022-08-23 15:23:00 UTC
(
hide
)
Description:
Bug 25812: Display overdue fines for the item on SIP checkin.
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-08-23 15:23:00 UTC
Size:
1.72 KB
patch
obsolete
>From 488915988c1fc04ebbf1b602690953ce2244fc41 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Wed, 25 Sep 2019 15:30:51 +0200 >Subject: [PATCH] Bug 25812: Display overdue fines for the item on SIP checkin. > >Test plan: > > - Using SIP, checkin an item that has one or several overdue fines. > - Check that the following message is displayed (AF field): > "You owe {correctly formatted price} for this item." > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/SIP/ILS.pm | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index e6c75671be..42089e80f7 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -246,6 +246,21 @@ sub checkin { > delete $item->{borrowernumber}; > delete $item->{due_date}; > $patron->{items} = [ grep { $_ ne $item_id } @{ $patron->{items} } ]; >+ # Check for overdue fines to display >+ my $kohaitem = Koha::Items->find( { barcode => $item_id } ); >+ if ($kohaitem) { >+ my $charges = Koha::Account::Lines->search( >+ { >+ borrowernumber => $patron->{borrowernumber}, >+ amountoutstanding => { '>' => 0 }, >+ accounttype => [ 'OVERDUE' ], >+ itemnumber => $kohaitem->itemnumber >+ }, >+ ); >+ if ($charges) { >+ $circ->screen_msg("You owe " . Koha::Number::Price->new( $charges->total_outstanding )->format({ with_symbol => 1}) . " for this item."); >+ } >+ } > } else { > # Checkin failed: Wrongbranch or withdrawn? > # Bug 10748 with pref BlockReturnOfLostItems adds another case to come >-- >2.20.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 25812
:
106056
|
106340
|
139690
|
144217
|
144476