Bugzilla – Attachment 118766 Details for
Bug 27927
longoverdue cronjob renews items before marking lost when both RenewAccruingItemWhenPaid and WhenLostForgiveFine are enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27927: Prevent renewal on lost forgive
Bug-27927-Prevent-renewal-on-lost-forgive.patch (text/plain), 1.85 KB, created by
Martin Renvoize
on 2021-03-24 17:16:49 UTC
(
hide
)
Description:
Bug 27927: Prevent renewal on lost forgive
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2021-03-24 17:16:49 UTC
Size:
1.85 KB
patch
obsolete
>From f2beb29b92764a7c7c0142d7093321850a076d5d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 24 Mar 2021 17:13:57 +0000 >Subject: [PATCH] Bug 27927: Prevent renewal on lost forgive > >The `RenewAccruingItemWhenPaid` preference should only renew upon >payment (and writeoff?) and not upon automatic forgival triggered by >`WhenLostForgiveFine`. >--- > Koha/Account/Line.pm | 20 ++++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) > >diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm >index 2cc81993ef..a7ab118df5 100644 >--- a/Koha/Account/Line.pm >+++ b/Koha/Account/Line.pm >@@ -597,7 +597,8 @@ sub apply { > # Attempt to renew the item associated with this debit if > # appropriate > if ($debit->renewable) { >- $debit->renew_item($params->{interface}); >+ $debit->renew_item( >+ { interface => $params->{interface}, credit => $self } ); > } > > # Same logic exists in Koha::Account::pay >@@ -929,15 +930,18 @@ sub renew_item { > # - There is an interface param passed and it's value is 'opac' > > if ( >- !C4::Context->preference('RenewAccruingItemWhenPaid') || >- !$self->item || >- !$self->patron || > ( >- !C4::Context->preference('RenewAccruingItemInOpac') && >- $params->{interface} && >- $params->{interface} eq 'opac' >+ exists $params->{credit} >+ && $params->{credit}->credit_type_code eq 'FORGIVEN' > ) >- ) { >+ || !C4::Context->preference('RenewAccruingItemWhenPaid') >+ || !$self->item >+ || !$self->patron >+ || ( !C4::Context->preference('RenewAccruingItemInOpac') >+ && $params->{interface} >+ && $params->{interface} eq 'opac' ) >+ ) >+ { > return; > } > >-- >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 27927
:
118766
|
118781
|
119193
|
119194
|
119235
|
119236
|
119676
|
119677