[Koha-bugs] [Bug 26993] Allow StoreLastBorrower to retain up to 2 previous patrons

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Aug 17 22:05:44 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26993

--- Comment #4 from Wally DesChamps <wdeschamps at prospertx.gov> ---
Here are two reports we use.  They are effective unless the patron marks their
account to not keep their history.

Check-Outs in a date range

1       SELECT i.barcode as 'Item Barcode',
2       b.title as 'Title',
3       i.itemcallnumber as 'Item Call Number',
4       a.timestamp as 'Date and Time',
5       concat(borr.surname,", ",borr.firstname) as 'Patron Name',
6       borr.cardnumber as 'Patron Barcode'
7       FROM action_logs a
8       LEFT JOIN borrowers borr on (borr.borrowernumber=a.object)
9       LEFT JOIN items i on (i.itemnumber=a.info)
10      INNER JOIN biblio b on (b.biblionumber=i.biblionumber)
11      WHERE a.action='ISSUE' AND DATE(a.timestamp) BETWEEN <<Between
(yyyy-mm-dd)|date>> AND <<and (yyyy-mm-dd)|date>>
12      ORDER BY borr.firstname asc 


Circulation History of an Item.

NOTE:  Must edit/save the SQL of the report with the target item’s barcode (in
line 14 below).

1       SELECT  
2       borrowers.cardnumber as "Cardnumber",
3       borrowers.othernames as "Othername",
4       borrowers.surname as "Surname",
5       items.itype,
6       items.barcode,
7       items.itemcallnumber as "Call Number",
8       date(statistics.datetime) as "Transaction Date",
9       statistics.type as "Transaction Type"
10      FROM borrowers 
11      LEFT JOIN statistics on
(statistics.borrowernumber=borrowers.borrowernumber) 
12      LEFT JOIN items on (items.itemnumber = statistics.itemnumber) 
13      LEFT JOIN biblioitems on (biblioitems.biblioitemnumber =
items.biblioitemnumber) 
14      WHERE items.barcode='21900004456'
15      ORDER BY statistics.datetime DESC

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list