Bugzilla – Attachment 141630 Details for
Bug 23012
Possibility to mark processing fee by default refund when item is found
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23012: [WIP] Mark processing fee as found when lost item found
Bug-23012-WIP-Mark-processing-fee-as-found-when-lo.patch (text/plain), 2.06 KB, created by
Aleisha Amohia
on 2022-10-12 04:24:48 UTC
(
hide
)
Description:
Bug 23012: [WIP] Mark processing fee as found when lost item found
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2022-10-12 04:24:48 UTC
Size:
2.06 KB
patch
obsolete
>From 94246f8dbc2a20d930e15c5cff809c02d4cdf5ad Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 12 Oct 2022 04:23:42 +0000 >Subject: [PATCH] Bug 23012: [WIP] Mark processing fee as found when lost item > found > >--- > Koha/Item.pm | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index e549be6d85b..7f89bff70d0 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -1183,6 +1183,19 @@ sub _set_found_trigger { > } > )->single; > >+ # refund processing charge made for lost book >+ my $processing_charge = Koha::Account::Lines->search( >+ { >+ itemnumber => $self->itemnumber, >+ debit_type_code => 'PROCESSING', >+ status => [ undef, { '<>' => 'FOUND' } ] >+ }, >+ { >+ order_by => { -desc => [ 'date', 'accountlines_id' ] }, >+ rows => 1 >+ } >+ )->single; >+ > if ( $lost_charge ) { > > my $patron = $lost_charge->patron; >@@ -1256,6 +1269,10 @@ sub _set_found_trigger { > $lost_charge->status('FOUND'); > $lost_charge->store(); > >+ if ( $processing_charge && $processing_charge->borrowernumber == $lost_charge->borrowernumber ) { >+ $processing_charge->status('FOUND')->store; >+ } >+ > # Reconcile balances if required > if ( C4::Context->preference('AccountAutoReconcile') ) { > $account->reconcile_balance; >@@ -1286,6 +1303,10 @@ sub _set_found_trigger { > # Update status of fine > $lost_overdue->status('FOUND')->store(); > >+ if ( $processing_charge && $processing_charge->borrowernumber == $lost_charge->borrowernumber ) { >+ $processing_charge->status('FOUND')->store; >+ } >+ > # Find related forgive credit > my $refund = $lost_overdue->credits( > { >-- >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 23012
:
141627
|
141628
|
141629
|
141630
|
142046
|
142047
|
142048
|
142049
|
142113
|
142123
|
142124
|
142125
|
142126
|
142481
|
142482
|
142483
|
142484
|
142485
|
142486
|
142487
|
142575
|
142652
|
142693
|
142736
|
142737