[Koha] overdue Report with guarantor name

Marcel Sandow marcelsandow at gmx.de
Mon Nov 26 08:37:40 NZDT 2012


Dear Koha community!

At our school we started working with koha. One challenge is to get the
appropriate overdue report.

For each pupil we have assigned the responsible teacher as the guarator.

What we would like to have is a overdue report like this (modified from
the sql report library):

SELECT p.guarantorid, p.surname, p.firstname, 
       c.issuedate, c.date_due, 
       (TO_DAYS(curdate())-TO_DAYS( date_due)) AS 'days overdue',
b.title, 
       i.barcode 
FROM borrowers p
LEFT JOIN issues c ON (p.borrowernumber=c.borrowernumber) 
LEFT JOIN items i ON (c.itemnumber=i.itemnumber) 
LEFT JOIN biblio b ON (i.biblionumber=b.biblionumber) 
WHERE c.branchcode = <<branchcode>> AND 
      (TO_DAYS(curdate())-TO_DAYS( date_due)) > 0 
ORDER BY p.guarantorid ASC, p.surname ASC, c.date_due ASC

but with the guarantor name not the ID number as the first column.

Any hints for me how the proceed.

Thanks in advance

all the best

Marcel




More information about the Koha mailing list