Prevent fines failure on NULL borrowernumber.
authorJoe Atzberger <joe.atzberger@liblime.com>
Fri, 23 Jan 2009 22:22:40 +0000 (16:22 -0600)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 26 May 2009 19:15:31 +0000 (21:15 +0200)
commit4e3249091a8b335ed8941dbf6641028ef6f005f6
treedf22b87f851166d2615ad5e725a2f98196c5fbab
parenta93a84749785cce6b7226181acac35799d3e70cf
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>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
misc/cronjobs/fines.pl