Lines 130-135
for my $overdue ( @{$overdues} ) {
Link Here
|
130 |
"ERROR in Getoverdues : issues.borrowernumber IS NULL. Repair 'issues' table now! Skipping record.\n"; |
130 |
"ERROR in Getoverdues : issues.borrowernumber IS NULL. Repair 'issues' table now! Skipping record.\n"; |
131 |
next; |
131 |
next; |
132 |
} |
132 |
} |
|
|
133 |
|
134 |
# if the issue changed before the script got to it, then pass on it. |
135 |
my $issue = Koha::Checkouts->find({ issue_id => $overdue->{issue_id} }); |
136 |
next if ( ! $issue or $issue->date_due ne $overdue->{date_due} ); |
137 |
|
138 |
my $datedue = dt_from_string( $overdue->{date_due} ); |
139 |
next unless $issue->is_overdue( $datedue ); |
140 |
|
133 |
my $patron = Koha::Patrons->find( $overdue->{borrowernumber} ); |
141 |
my $patron = Koha::Patrons->find( $overdue->{borrowernumber} ); |
134 |
my $branchcode = |
142 |
my $branchcode = |
135 |
( $control eq 'ItemHomeLibrary' ) ? $overdue->{$branch_type} |
143 |
( $control eq 'ItemHomeLibrary' ) ? $overdue->{$branch_type} |
Lines 141-150
for my $overdue ( @{$overdues} ) {
Link Here
|
141 |
$is_holiday{$branchcode} = set_holiday( $branchcode, $today ); |
149 |
$is_holiday{$branchcode} = set_holiday( $branchcode, $today ); |
142 |
} |
150 |
} |
143 |
|
151 |
|
144 |
my $datedue = dt_from_string( $overdue->{date_due} ); |
|
|
145 |
if ( DateTime->compare( $datedue, $today ) == 1 ) { |
146 |
next; # not overdue |
147 |
} |
148 |
++$counted; |
152 |
++$counted; |
149 |
|
153 |
|
150 |
my ( $amount, $unitcounttotal, $unitcount ) = |
154 |
my ( $amount, $unitcounttotal, $unitcount ) = |
Lines 160-165
for my $overdue ( @{$overdues} ) {
Link Here
|
160 |
&& ( $amount && $amount > 0 ) |
164 |
&& ( $amount && $amount > 0 ) |
161 |
) |
165 |
) |
162 |
{ |
166 |
{ |
|
|
167 |
# if the issue changed before the script got to it, then pass on it. |
168 |
my $issue = Koha::Checkouts->find({ issue_id => $overdue->{issue_id} }); |
169 |
next if ( ! $issue or $issue->date_due ne $overdue->{date_due} ); |
163 |
UpdateFine( |
170 |
UpdateFine( |
164 |
{ |
171 |
{ |
165 |
issue_id => $overdue->{issue_id}, |
172 |
issue_id => $overdue->{issue_id}, |
166 |
- |
|
|