Lines 275-281
sub GetAllIssues {
Link Here
|
275 |
|
275 |
|
276 |
my $dbh = C4::Context->dbh; |
276 |
my $dbh = C4::Context->dbh; |
277 |
my $query = |
277 |
my $query = |
278 |
'SELECT *, issues.timestamp as issuestimestamp, issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp |
278 |
'SELECT issues.*, items.*, biblio.*, biblioitems.*, issues.timestamp as issuestimestamp, issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp,borrowers.firstname,borrowers.surname |
279 |
FROM issues |
279 |
FROM issues |
280 |
LEFT JOIN items on items.itemnumber=issues.itemnumber |
280 |
LEFT JOIN items on items.itemnumber=issues.itemnumber |
281 |
LEFT JOIN borrowers on borrowers.borrowernumber=issues.issuer |
281 |
LEFT JOIN borrowers on borrowers.borrowernumber=issues.issuer |
Lines 283-289
sub GetAllIssues {
Link Here
|
283 |
LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber |
283 |
LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber |
284 |
WHERE issues.borrowernumber=? |
284 |
WHERE issues.borrowernumber=? |
285 |
UNION ALL |
285 |
UNION ALL |
286 |
SELECT *, old_issues.timestamp as issuestimestamp, old_issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp |
286 |
SELECT old_issues.*, items.*, biblio.*, biblioitems.*, old_issues.timestamp as issuestimestamp, old_issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp,borrowers.firstname,borrowers.surname |
287 |
FROM old_issues |
287 |
FROM old_issues |
288 |
LEFT JOIN items on items.itemnumber=old_issues.itemnumber |
288 |
LEFT JOIN items on items.itemnumber=old_issues.itemnumber |
289 |
LEFT JOIN borrowers on borrowers.borrowernumber=old_issues.issuer |
289 |
LEFT JOIN borrowers on borrowers.borrowernumber=old_issues.issuer |
290 |
- |
|
|