From b31859946b90ac1ea5f5914477bd382f2025151e Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 25 Aug 2008 12:13:38 -0500 Subject: [PATCH] bug 2552: correct issue history display The loan history for a bib can be incorrect if the bib's biblioitemnumber is not the same as its biblionumber. This was due to a bad join in GetBiblioIssues(). Credit to Michael Hafen for patching a similar bug, which inspired me to check for other bad joins. Signed-off-by: Galen Charlton --- C4/Circulation.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index c9c76848a9..5d936c3e7f 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1800,7 +1800,7 @@ sub GetBiblioIssues { LEFT JOIN borrowers ON borrowers.borrowernumber = issues.borrowernumber LEFT JOIN items ON issues.itemnumber = items.itemnumber LEFT JOIN biblioitems ON items.itemnumber = biblioitems.biblioitemnumber - LEFT JOIN biblio ON biblio.biblionumber = items.biblioitemnumber + LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber WHERE biblio.biblionumber = ? UNION ALL SELECT old_issues.*,items.barcode,biblio.biblionumber,biblio.title, biblio.author,borrowers.cardnumber,borrowers.surname,borrowers.firstname @@ -1808,7 +1808,7 @@ sub GetBiblioIssues { LEFT JOIN borrowers ON borrowers.borrowernumber = old_issues.borrowernumber LEFT JOIN items ON old_issues.itemnumber = items.itemnumber LEFT JOIN biblioitems ON items.itemnumber = biblioitems.biblioitemnumber - LEFT JOIN biblio ON biblio.biblionumber = items.biblioitemnumber + LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber WHERE biblio.biblionumber = ? ORDER BY timestamp "; -- 2.39.5