|
Lines 48-53
my $verbose;
Link Here
|
| 48 |
my $output_dir; |
48 |
my $output_dir; |
| 49 |
my $log; |
49 |
my $log; |
| 50 |
my $maxdays; |
50 |
my $maxdays; |
|
|
51 |
my $verify_issue; |
| 51 |
|
52 |
|
| 52 |
my $command_line_options = join(" ",@ARGV); |
53 |
my $command_line_options = join(" ",@ARGV); |
| 53 |
|
54 |
|
|
Lines 57-62
GetOptions(
Link Here
|
| 57 |
'l|log' => \$log, |
58 |
'l|log' => \$log, |
| 58 |
'o|out:s' => \$output_dir, |
59 |
'o|out:s' => \$output_dir, |
| 59 |
'm|maxdays:i' => \$maxdays, |
60 |
'm|maxdays:i' => \$maxdays, |
|
|
61 |
'i|verifyissue' => \$verify_issue, |
| 60 |
); |
62 |
); |
| 61 |
my $usage = << 'ENDUSAGE'; |
63 |
my $usage = << 'ENDUSAGE'; |
| 62 |
|
64 |
|
|
Lines 71-76
This script has the following parameters :
Link Here
|
| 71 |
-o --out: ouput directory for logs (defaults to env or /tmp if !exist) |
73 |
-o --out: ouput directory for logs (defaults to env or /tmp if !exist) |
| 72 |
-v --verbose |
74 |
-v --verbose |
| 73 |
-m --maxdays: how many days back of overdues to process |
75 |
-m --maxdays: how many days back of overdues to process |
|
|
76 |
-i --verifyissue: verify the issue before updating the fine in case the |
| 77 |
item is returned while the fines job is running |
| 74 |
|
78 |
|
| 75 |
ENDUSAGE |
79 |
ENDUSAGE |
| 76 |
|
80 |
|
|
Lines 160-165
for my $overdue ( @{$overdues} ) {
Link Here
|
| 160 |
&& ( $amount && $amount > 0 ) |
164 |
&& ( $amount && $amount > 0 ) |
| 161 |
) |
165 |
) |
| 162 |
{ |
166 |
{ |
|
|
167 |
if ( $verify_issue ) { |
| 168 |
# if the issue changed before the script got to it, then pass on it. |
| 169 |
my $issue = Koha::Checkouts->find({ issue_id => $overdue->{issue_id} }); |
| 170 |
if ( ! $issue or $issue->date_due ne $overdue->{date_due} ) { |
| 171 |
$counted--; |
| 172 |
next; |
| 173 |
} |
| 174 |
} |
| 163 |
UpdateFine( |
175 |
UpdateFine( |
| 164 |
{ |
176 |
{ |
| 165 |
issue_id => $overdue->{issue_id}, |
177 |
issue_id => $overdue->{issue_id}, |
| 166 |
- |
|
|