Bugzilla – Attachment 96969 Details for
Bug 24361
Fix warnings (or failing tests) from bug 24217
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24361: (follow-up) Fix CalcFine.t
Bug-24361-follow-up-Fix-CalcFinet.patch (text/plain), 1.32 KB, created by
Jonathan Druart
on 2020-01-07 21:54:42 UTC
(
hide
)
Description:
Bug 24361: (follow-up) Fix CalcFine.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-01-07 21:54:42 UTC
Size:
1.32 KB
patch
obsolete
>From 73334f20128223c8a3bf0cf7fd36be0c5150b437 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 7 Jan 2020 22:52:15 +0100 >Subject: [PATCH] Bug 24361: (follow-up) Fix CalcFine.t > >I mixed up 2 possible solutions, the "not defined" is handled by the "! defined $item->{replacementprice}" part > >t/db_dependent/Circulation/CalcFine.t .. 1/3 > # Failed test 'Amount is calculated correctly' > # at t/db_dependent/Circulation/CalcFine.t line 167. > # got: '29' > # expected: '6' > # Looks like you failed 1 test of 2. >--- > C4/Overdues.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index 26ce74850d..09d4119985 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -261,7 +261,7 @@ sub CalcFine { > $amount = $issuing_rule->overduefinescap if $issuing_rule->overduefinescap && $amount > $issuing_rule->overduefinescap; > > # This must be moved to Koha::Item (see also similar code in C4::Accounts::chargelostitem >- $item->{replacementprice} //= $itemtype->defaultreplacecost >+ $item->{replacementprice} ||= $itemtype->defaultreplacecost > if $itemtype > && ( ! defined $item->{replacementprice} || $item->{replacementprice} == 0 ) > && C4::Context->preference("useDefaultReplacementCost"); >-- >2.11.0
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 24361
:
96873
|
96892
| 96969 |
97315
|
97991
|
98796