From f70e9440a52576d9c47c6cfebceae2819ecbcd81 Mon Sep 17 00:00:00 2001 From: Ian Walls Date: Thu, 5 Apr 2012 06:48:47 -0400 Subject: [PATCH] Bug 7849 Followup: only charge fines on return if finesMode set to production If the finesMode system preference is anything but 'production', patrons shouldn't actually be charged any fines, even if the rules say they should accrue them. This followup adds that conditional check, in order to prevent surprise fines at libraries with such a configuration. To test: 1. identify 2 overdue materials with associated fines rules 2. set fines mode to 'production' 3. return the first item: patron should be charged 4. set fines mode to 'test' or 'none' 5. return the second item: the patron should not be charged Followup idea: if either 'test' or 'production', return the fine amt that was/would have been charged, so it can be displayed on screen. --- C4/Circulation.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 89d002e..e1ce86d 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1613,7 +1613,7 @@ sub AddReturn { if($issue->{'overdue'}){ my ( $amount, $type, $daycounttotal ) = C4::Overdues::CalcFine( $item, $borrower->{categorycode},$branch, $datedue, $today ); my $type ||= q{}; - if ( $amount > 0 ) { + if ( $amount > 0 && ( C4::Context->preference('finesMode') eq 'production' ) ) { C4::Overdues::UpdateFine( $issue->{itemnumber}, $issue->{borrowernumber}, -- 1.7.2.5