Bugzilla – Attachment 18157 Details for
Bug 10030
MaxFines checks against amount, not amount outstanding
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10030: QA Followup for trivial false warning detected while testing
Bug-10030-QA-Followup-for-trivial-false-warning-de.patch (text/plain), 1.48 KB, created by
Marcel de Rooy
on 2013-05-15 14:21:58 UTC
(
hide
)
Description:
Bug 10030: QA Followup for trivial false warning detected while testing
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-05-15 14:21:58 UTC
Size:
1.48 KB
patch
obsolete
>From 9213725ecd5eaef0e3c731a229c8c7a2d9fcbfe0 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 15 May 2013 16:06:49 +0200 >Subject: [PATCH] Bug 10030: QA Followup for trivial false warning detected > while testing >Content-Type: text/plain; charset=utf-8 > >Moving the warn line below the line that returns if amount<=0. >If amount<=0, a false warn is now raised because of the return after it. >We should only warn here if we do not return. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Tested with fines.pl on overdue. >Before this patch: >Reducing fine for item 199709 borrower 23 from 44 to -1 - MaxFine reached. >This did not happen however because of the return. >After this change: no false warning. >--- > C4/Overdues.pm | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index c99a669..9c05668 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -546,9 +546,8 @@ sub UpdateFine { > if (my $maxfine = C4::Context->preference('MaxFine')) { > if ($total_amount_other + $amount > $maxfine) { > my $new_amount = $maxfine - $total_amount_other; >- warn "Reducing fine for item $itemnum borrower $borrowernumber from $amount to $new_amount - MaxFine reached"; > return if $new_amount <= 0.00; >- >+ warn "Reducing fine for item $itemnum borrower $borrowernumber from $amount to $new_amount - MaxFine reached"; > $amount = $new_amount; > } > } >-- >1.7.7.6
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 10030
:
17372
|
17568
|
18156
| 18157