Prevent fines failure on NULL borrowernumber.
authorJoe Atzberger <joe.atzberger@liblime.com>
Fri, 23 Jan 2009 22:22:40 +0000 (16:22 -0600)
committerGalen Charlton <galen.charlton@liblime.com>
Mon, 11 May 2009 22:43:38 +0000 (17:43 -0500)
commit8695b7e84f22f0047e6d2204bc6248e6089c21f7
tree2cf07db62e354e7f5f2f9f84cb535795eff78e1a
parent6085209dd368754d5276a4464afe721950a6c8fe
Prevent fines failure on NULL borrowernumber.

The problem is that we do not ensure that the issues table has valid
borrowernumber in each line.  This is exacerbated by Getoverdues()
returning data sorted BY borrowernumber.  So one NULL borrowernumber
in issues prevented ALL fines from being assessed.  The actual error
from fines.pl cron log is:
  No branchcode argument to new.  Should be C4::Calendar->new(branchcode => $branchcode)
  at /home/user/kohaclone/misc/cronjobs/fines.pl line 98

This patch deals only with getting fines to avoid crashing.  It does
not fix the underlying data integrity problem.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
misc/cronjobs/fines.pl