Lines 49-54
my $output_dir;
Link Here
|
49 |
my $log; |
49 |
my $log; |
50 |
my $maxdays; |
50 |
my $maxdays; |
51 |
my $verify_issue; |
51 |
my $verify_issue; |
|
|
52 |
my $maxfinesdays; |
52 |
|
53 |
|
53 |
my $command_line_options = join(" ",@ARGV); |
54 |
my $command_line_options = join(" ",@ARGV); |
54 |
|
55 |
|
Lines 59-64
GetOptions(
Link Here
|
59 |
'o|out:s' => \$output_dir, |
60 |
'o|out:s' => \$output_dir, |
60 |
'm|maxdays:i' => \$maxdays, |
61 |
'm|maxdays:i' => \$maxdays, |
61 |
'i|verifyissue' => \$verify_issue, |
62 |
'i|verifyissue' => \$verify_issue, |
|
|
63 |
'maxfinesdays=i' => \$maxfinesdays |
62 |
); |
64 |
); |
63 |
my $usage = << 'ENDUSAGE'; |
65 |
my $usage = << 'ENDUSAGE'; |
64 |
|
66 |
|
Lines 75-80
This script has the following parameters :
Link Here
|
75 |
-m --maxdays: how many days back of overdues to process |
77 |
-m --maxdays: how many days back of overdues to process |
76 |
-i --verifyissue: verify the issue before updating the fine in case the |
78 |
-i --verifyissue: verify the issue before updating the fine in case the |
77 |
item is returned while the fines job is running |
79 |
item is returned while the fines job is running |
|
|
80 |
--maxfinesdays: number of days after which normal fine amount should jump to maximal amount |
78 |
|
81 |
|
79 |
ENDUSAGE |
82 |
ENDUSAGE |
80 |
|
83 |
|
Lines 151-159
for my $overdue ( @{$overdues} ) {
Link Here
|
151 |
} |
154 |
} |
152 |
++$counted; |
155 |
++$counted; |
153 |
|
156 |
|
154 |
my ( $amount, $unitcounttotal, $unitcount ) = |
157 |
my ( $amount, $unitcounttotal, $unitcount); |
155 |
CalcFine( $overdue, $patron->categorycode, |
158 |
if ( defined($maxfinesdays) && $maxfinesdays <= $datedue->delta_days( $today )) { |
156 |
$branchcode, $datedue, $today ); |
159 |
my $itype = $overdue->{itemtype} || $overdue->{itype}; |
|
|
160 |
my $data = C4::Circulation::GetIssuingRule( $borrower->{categorycode}, $itype, $branchcode ); |
161 |
$amount = $data->{overduefinescap}; |
162 |
} |
163 |
if (!$amount) { |
164 |
( $amount, $unitcounttotal, $unitcount ) = CalcFine( $overdue, $borrower->{categorycode}, $branchcode, $datedue, $today ); |
165 |
} |
166 |
|
157 |
|
167 |
|
158 |
# Don't update the fine if today is a holiday. |
168 |
# Don't update the fine if today is a holiday. |
159 |
# This ensures that dropbox mode will remove the correct amount of fine. |
169 |
# This ensures that dropbox mode will remove the correct amount of fine. |
160 |
- |
|
|