Bugzilla – Attachment 98436 Details for
Bug 24474
Lost items that are checked out are always returned, even when attempting to renew them
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24474: Drop `ReturnLostItem` from ::Account classes
Bug-24474-Drop-ReturnLostItem-from-Account-classes.patch (text/plain), 2.64 KB, created by
Martin Renvoize (ashimema)
on 2020-02-05 09:21:57 UTC
(
hide
)
Description:
Bug 24474: Drop `ReturnLostItem` from ::Account classes
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-02-05 09:21:57 UTC
Size:
2.64 KB
patch
obsolete
>From 851b15daacdefbd32d628222aff37ee400084530 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 5 Feb 2020 09:14:24 +0000 >Subject: [PATCH] Bug 24474: Drop `ReturnLostItem` from ::Account classes > >This patche removes the ReturnLostItem calls from Koha::Account->pay and >Koha::Account::Line->apply methods. >--- > Koha/Account.pm | 18 ------------------ > Koha/Account/Line.pm | 10 ---------- > 2 files changed, 28 deletions(-) > >diff --git a/Koha/Account.pm b/Koha/Account.pm >index ae6bebbb7a..8f06ab8ede 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -24,7 +24,6 @@ use Data::Dumper; > use List::MoreUtils qw( uniq ); > use Try::Tiny; > >-use C4::Circulation qw( ReturnLostItem ); > use C4::Letters; > use C4::Log qw( logaction ); > use C4::Stats qw( UpdateStats ); >@@ -114,15 +113,6 @@ sub pay { > $fine->amountoutstanding($new_amountoutstanding)->store(); > $balance_remaining = $balance_remaining - $amount_to_pay; > >- # Same logic exists in Koha::Account::Line::apply >- if ( $new_amountoutstanding == 0 >- && $fine->itemnumber >- && $fine->debit_type_code >- && ( $fine->debit_type_code eq 'LOST' ) ) >- { >- C4::Circulation::ReturnLostItem( $self->{patron_id}, $fine->itemnumber ); >- } >- > my $account_offset = Koha::Account::Offset->new( > { > debit_id => $fine->id, >@@ -174,14 +164,6 @@ sub pay { > $fine->amountoutstanding( $old_amountoutstanding - $amount_to_pay ); > $fine->store(); > >- if ( $fine->amountoutstanding == 0 >- && $fine->itemnumber >- && $fine->debit_type_code >- && ( $fine->debit_type_code eq 'LOST' ) ) >- { >- C4::Circulation::ReturnLostItem( $self->{patron_id}, $fine->itemnumber ); >- } >- > my $account_offset = Koha::Account::Offset->new( > { > debit_id => $fine->id, >diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm >index 1fac85d10c..152a9ec214 100644 >--- a/Koha/Account/Line.pm >+++ b/Koha/Account/Line.pm >@@ -482,16 +482,6 @@ sub apply { > > $self->amountoutstanding( $available_credit * -1 )->store; > $debit->amountoutstanding( $owed - $amount_to_cancel )->store; >- >- # Same logic exists in Koha::Account::pay >- if ( $debit->amountoutstanding == 0 >- && $debit->itemnumber >- && $debit->debit_type_code >- && $debit->debit_type_code eq 'LOST' ) >- { >- C4::Circulation::ReturnLostItem( $self->borrowernumber, $debit->itemnumber ); >- } >- > } > }); > >-- >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 24474
:
98392
|
98393
|
98436
|
98437
|
98438
|
98439
|
98460
|
98485
|
98486
|
98487
|
98645
|
98646
|
98647
|
98648
|
98673
|
98674
|
98675
|
98676
|
98923
|
100229
|
100230
|
100231
|
100232
|
100233
|
102104
|
102105
|
102106
|
102107
|
102108
|
102109
|
102110
|
102132
|
102133
|
102134
|
102135
|
102136
|
102137
|
102138