From 01cab7dcc2eff438bf434cdde621b1db487e0899 Mon Sep 17 00:00:00 2001 From: rangi Date: Fri, 5 Apr 2002 03:13:21 +0000 Subject: [PATCH] Have realised misc/fines2.pl is the real fines script, this one can be removed so as to remove one more source of confusion --- fines.pl | 61 -------------------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100755 fines.pl diff --git a/fines.pl b/fines.pl deleted file mode 100755 index c118d3286a..0000000000 --- a/fines.pl +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/perl - -#script to calculate fines - - -use C4::Circulation::Fines; -use Date::Manip; - -open (FILE,'>/tmp/fines') || die; -my ($count,$data)=Getoverdues(); -#print $count; -my $count2=0; -#$count=1000; -my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =localtime(time); -$mon++; -$year=$year+1900; -#my $date=Date_DaysSince999($mon,$mday,$year); -my $date=Date_DaysSince999(2,20,2000); -my $bornum; -my $borrower; -my $total=0; -my $max=5; -my $bornum2; -for (my $i=0;$i<$count;$i++){ - my @dates=split('-',$data->[$i]->{'date_due'}); - my $date2=Date_DaysSince999($dates[1],$dates[2],$dates[0]); - my $due="$dates[2]/$dates[1]/$dates[0]"; - if ($date2 <= $date){ - $count2++; - my $difference=$date-$date2; - if ($bornum != $data->[$i]->{'borrowernumber'}){ - - $bornum=$data->[$i]->{'borrowernumber'}; - $borrower=BorType($bornum); - } - - - my ($amount,$type,$printout)=CalcFine($data->[$i]->{'itemnumber'},$borrower->{'categorycode'},$difference); - if ($amount > $max){ - $amount=$max; - } - if ($amount > 0){ - UpdateFine($data->[$i]->{'itemnumber'},$bornum,$amount,$type,$due); - if ($bornum2 == $data->[$i]->{'borrowernumber'}){ - $total=$total+$amount; - } else { - print FILE "\"$borrower->{'cardnumber'}\"\,\"$borrower->{'phone'}\"\,\"Overdue or Extd Rental$total\"\,\"$borrower->{'homebranch'}\"\n"; - $total=$amount; - } - if ($amount ==5){ -# marklost(); - } - print "$printout\t$borrower->{'cardnumber'}\t$borrower->{'firstname'}\t$borrower->{'surname'}\t$data->[$i]->{'date_due'}\t$type\t$difference\t$borrower->{'emailaddress'}\t$borrower->{'phone'}\t$borrower->{'streetaddress'}\t$borrower->{'city'}\n"; - } else { -# print "0 fine\n"; - } - - } - $bornum2=$data->[$i]->{'borrowernumber'}; -} -close FILE; -- 2.39.5