Bugzilla – Attachment 102985 Details for
Bug 24380
Add option to recalculate fines upon a backdated return distinctly from `CalculateFinesOnReturn`
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24380: Simplify condition
Bug-24380-Simplify-condition.patch (text/plain), 1.50 KB, created by
Jonathan Druart
on 2020-04-15 10:50:41 UTC
(
hide
)
Description:
Bug 24380: Simplify condition
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-15 10:50:41 UTC
Size:
1.50 KB
patch
obsolete
>From 788f55b5dd2bc081303a5049fc216307cacd7fa1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 Apr 2020 12:44:47 +0200 >Subject: [PATCH] Bug 24380: Simplify condition > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Circulation.pm | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 527b878858..faaa2692e8 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1973,11 +1973,14 @@ sub AddReturn { > MarkIssueReturned( $borrowernumber, $item->itemnumber, $return_date, $patron->privacy ); > }; > unless ( $@ ) { >- my $calc_fine = C4::Context->preference('CalculateFinesOnReturn'); >- $calc_fine ||= $return_date_specified && C4::Context->preference('CalculateFinesOnBackdate'); >- $calc_fine &&= !$item->itemlost; >- >- if ( $calc_fine ) { >+ if ( >+ ( >+ C4::Context->preference('CalculateFinesOnReturn') >+ || ( $return_date_specified && C4::Context->preference('CalculateFinesOnBackdate') ) >+ ) >+ && !$item->itemlost >+ ) >+ { > _CalculateAndUpdateFine( { issue => $issue, item => $item->unblessed, borrower => $patron_unblessed, return_date => $return_date } ); > } > } else { >-- >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 24380
:
97055
|
97544
|
97750
|
97751
|
97752
|
99536
|
99537
|
99538
|
102574
|
102575
|
102576
|
102577
|
102894
|
102895
|
102896
|
102981
|
102982
|
102983
|
102984
| 102985