[Koha-patches] [PATCH] In cronjobs/fines.pl Between CalcFine and UpdateFine put $type to use

Michael Hafen mdhafen at tech.washk12.org
Wed Sep 10 19:00:41 CEST 2008


CalcFine doesn't set $type, which UpdateFine uses in the description of
the fine if it creates one.
For cronjobs/fines.pl I put effectively "Overdue at $branchcode" in it.
This give a slightly more meaningful fine description.
---
 misc/cronjobs/fines.pl |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/misc/cronjobs/fines.pl b/misc/cronjobs/fines.pl
index 0e28357..fdbcb4b 100755
--- a/misc/cronjobs/fines.pl
+++ b/misc/cronjobs/fines.pl
@@ -107,7 +107,10 @@ for (my $i=0; $i<scalar(@$data); $i++) {
     my ($amount,$type,$daycounttotal,$daycount)=
   		CalcFine($data->[$i], $borrower->{'categorycode'}, $branchcode,undef,undef, $datedue, $today);
         # FIXME: $type NEVER gets populated by anything.
-    (defined $type) or $type = '';
+	$type = 'Overdue';
+	if ( C4::Context->preference('IndependantBranches') ) {
+		$type .= " at $branchcode";
+	}
 	# Don't update the fine if today is a holiday.  
   	# This ensures that dropbox mode will remove the correct amount of fine.
 	if ($mode eq 'production' and  ! $isHoliday) {
-- 
1.5.4.3




More information about the Koha-patches mailing list