Commit b772af9c authored by Torstein Nicolaysen's avatar Torstein Nicolaysen
Browse files

Revert "DEICH-5641 include returned items in kemnersaker issues"

This reverts commit 2594a65c.
parent 2a2cc011
...@@ -63,13 +63,13 @@ sub GetByPatron { ...@@ -63,13 +63,13 @@ sub GetByPatron {
FROM kemnersaker k FROM kemnersaker k
JOIN issues iss USING(issue_id) JOIN issues iss USING(issue_id)
WHERE k.borrowernumber = ? WHERE k.borrowernumber = ?
AND k.status IN ('new', 'sent', 'returned') AND k.status IN ('new', 'sent')
UNION UNION
SELECT k.issue_id, k.itemnumber, k.timestamp, k.status, iss.date_due, iss.issuedate, iss.returndate SELECT k.issue_id, k.itemnumber, k.timestamp, k.status, iss.date_due, iss.issuedate, iss.returndate
FROM kemnersaker k FROM kemnersaker k
JOIN old_issues iss USING(issue_id) JOIN old_issues iss USING(issue_id)
WHERE k.borrowernumber = ? WHERE k.borrowernumber = ?
AND k.status IN ('new', 'sent', 'returned') AND k.status IN ('new', 'sent')
) ks ) ks
JOIN items it ON (it.itemnumber=ks.itemnumber) JOIN items it ON (it.itemnumber=ks.itemnumber)
JOIN biblio bib ON (bib.biblionumber=it.biblionumber); JOIN biblio bib ON (bib.biblionumber=it.biblionumber);
......
...@@ -24,13 +24,13 @@ sub GetActiveCases { ...@@ -24,13 +24,13 @@ sub GetActiveCases {
FROM kemnersaker k FROM kemnersaker k
JOIN issues iss USING(issue_id) JOIN issues iss USING(issue_id)
WHERE k.borrowernumber = ? WHERE k.borrowernumber = ?
AND k.status IN ('new', 'sent', 'returned') AND k.status IN ('new', 'sent')
UNION UNION
SELECT k.issue_id, k.itemnumber, k.timestamp, k.status, iss.date_due, iss.issuedate, iss.returndate SELECT k.issue_id, k.itemnumber, k.timestamp, k.status, iss.date_due, iss.issuedate, iss.returndate
FROM kemnersaker k FROM kemnersaker k
JOIN old_issues iss USING(issue_id) JOIN old_issues iss USING(issue_id)
WHERE k.borrowernumber = ? WHERE k.borrowernumber = ?
AND k.status IN ('new', 'sent', 'returned') AND k.status IN ('new', 'sent')
) ks ) ks
JOIN items it ON (it.itemnumber=ks.itemnumber) JOIN items it ON (it.itemnumber=ks.itemnumber)
JOIN biblio bib ON (bib.biblionumber=it.biblionumber); JOIN biblio bib ON (bib.biblionumber=it.biblionumber);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment