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