Bugzilla – Attachment 12893 Details for
Bug 8939
Fines Charged During Grace Period
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fine calculation condition update
0001-Bug-8939-Fines-Charged-During-Grace-Period.patch (text/plain), 1.09 KB, created by
Robert Williams
on 2012-10-17 23:58:56 UTC
(
hide
)
Description:
Fine calculation condition update
Filename:
MIME Type:
Creator:
Robert Williams
Created:
2012-10-17 23:58:56 UTC
Size:
1.09 KB
patch
obsolete
>--- > C4/Overdues.pm | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index d17f445..ac66c36 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -263,10 +263,10 @@ sub CalcFine { > my $chargeable_units = _get_chargeable_units($fine_unit, $start_date, $end_date, $branchcode); > my $units_minus_grace = $chargeable_units - $data->{firstremind}; > my $amount = 0; >- if ($data->{'chargeperiod'} && $units_minus_grace ) { >+ if ($data->{'chargeperiod'} && ($units_minus_grace > 0) ) { > $amount = int($chargeable_units / $data->{'chargeperiod'}) * $data->{'fine'};# TODO fine calc should be in cents > } else { >- # a zero (or null) chargeperiod means no charge. >+ # a zero (or null) chargeperiod or negative units_minus_grace value means no charge. > } > $amount = $data->{overduefinescap} if $data->{overduefinescap} && $amount > $data->{overduefinescap}; > $debug and warn sprintf("CalcFine returning (%s, %s, %s, %s)", $amount, $data->{'chargename'}, $units_minus_grace, $chargeable_units); >-- >1.7.9.msysgit.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 8939
:
12893
|
12894