When running fines.pl, any overdue items that have no corresponding circulation rule will generate the following warning:
Use of uninitialized value $amount in numeric gt (>) at /usr/share/koha/bin/cronjobs/fines.pl line 133.
Test Plan:
1) Create a single circ rule
2) Backdate a checkout so it is overdue
3) Delete the circ rule
4) Run fines.pl, note the warning
5) Apply this patch
6) Run fines.pl, note the warning is gone
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
# 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' && !$is_holiday{$branchcode} ) {
- if ( $amount > 0 ) {
+ if ( $amount && $amount > 0 ) {
UpdateFine(
{
issue_id => $overdue->{issue_id},