[Koha] Account report

Tony Morton TONY at waimatedc.govt.nz
Tue Oct 22 16:00:16 NZDT 2013


Hi all of you who are more koha report savvy,

I use this report to send out our overdue account letters but would like to add in the earliest account date to enable me to send out monthly letters.

Please help me.
Accounts with more than
Total number of rows matching the (unlimited) query is 162.
SELECT p.cardnumber, p.surname, p.firstname, p.address, p.address2, p.city, p.state, p.phone, p.branchcode AS 'patron branch',
       p.debarred , p.debarredcomment, p.dateexpiry, format(sum(a.amountoutstanding),2) AS  'amount owed'
FROM borrowers p
LEFT JOIN accountlines a USING (borrowernumber)
GROUP BY a.borrowernumber
HAVING sum(a.amountoutstanding) >



Tony Morton | Senior Librarian
Waimate District Library
Waimate District Council | 125 Queen Street | PO Box 122 | Waimate 7960 | New Zealand
*: +64 3 689 0000 | DDI: +64 3 689 0071 | Ê: +64 3 689 8075 | Mobile: +64 0210740867
*: tony at waimatedc.govt.nz<mailto:tony at waimatedc.govt.nz> | ý  www.waimatedc.govt.nz<http://www.waimatedc.govt.nz/>


______________________________________________________________________________
This email has been scrubbed for your protection by SMX.
For more information visit http://smxemail.com
______________________________________________________________________________



More information about the Koha mailing list