In Overdues.pm subroutine CheckBorrowerDebarred. As far as I can tell debarred is 0 or 1 what is the purpose of testing against NOW()? sub CheckBorrowerDebarred { my ($borrowernumber) = @_; my $dbh = C4::Context->dbh; my $query = qq| SELECT debarred FROM borrowers WHERE borrowernumber=? AND debarred > NOW() <==========?? |; my $sth = $dbh->prepare($query); $sth->execute($borrowernumber); my $debarredstatus = $sth->fetchrow; return $debarredstatus; }
debarred is now a date field in the database (connected to the fines in days feature) - which version are you looking at?
I believe this is a legacy data issue. New patrons are given a debarred date of 12-31-9999, debarred patrons are assigned a specific debarred date, while legacy patrons retain a [NULL] for debarred status in the borrowers table. Custom scripts will need to address these three possibilities.
(In reply to comment #1) > debarred is now a date field in the database (connected to the fines in days > feature) - which version are you looking at? I have to systems running a test system which is 3.09.00.029 at a system I'm preparing to migrate our data into which is 3.09.00.059. On the .029 the database is still a tinyint for that field. It could have been that the database conversion failed. The .059 system has the correct datatype.