From b51288469c069ca304bc94c00a75b233798d4150 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 7 Jul 2017 09:04:21 +0200 Subject: [PATCH] Bug 18276: [QA Follow-up] Fix two new calls Content-Type: text/plain; charset=utf-8 Found two calls in opac-issue-note.pl and svc/patron_notes. Signed-off-by: Marcel de Rooy --- opac/opac-issue-note.pl | 8 ++++---- opac/svc/patron_notes | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/opac/opac-issue-note.pl b/opac/opac-issue-note.pl index becd708..832e365 100755 --- a/opac/opac-issue-note.pl +++ b/opac/opac-issue-note.pl @@ -53,11 +53,11 @@ $template->param( my $issue_id = $query->param('issue_id'); my $issue = Koha::Checkouts->find( $issue_id ); my $itemnumber = $issue->itemnumber; -my $biblio = GetBiblioFromItemNumber($itemnumber); +my $biblio = $issue->item->biblio; $template->param( issue_id => $issue_id, - title => $biblio->{'title'}, - author => $biblio->{'author'}, + title => $biblio->title, + author => $biblio->author, note => $issue->note, itemnumber => $issue->itemnumber, ); @@ -75,7 +75,7 @@ if ( $action eq 'issuenote' && C4::Context->preference('AllowCheckoutNotes') ) { letter_code => 'PATRON_NOTE', branchcode => $branch, tables => { - 'biblio' => $biblio->{biblionumber}, + 'biblio' => $biblio->biblionumber, 'borrowers' => $member->{borrowernumber}, }, ); diff --git a/opac/svc/patron_notes b/opac/svc/patron_notes index d241f0c..d68bb69 100755 --- a/opac/svc/patron_notes +++ b/opac/svc/patron_notes @@ -79,13 +79,13 @@ if ($is_ajax) { $issue->set({ notedate => dt_from_string(), note => $clean_note })->store; if($clean_note) { # only send email if note not empty my $branch = Koha::Libraries->find( $issue->branchcode ); - my $biblio = GetBiblioFromItemNumber($issue->itemnumber); + my $biblionumber = $issue->item->biblionumber; my $letter = C4::Letters::GetPreparedLetter ( module => 'circulation', letter_code => 'PATRON_NOTE', branchcode => $branch, tables => { - 'biblio' => $biblio->{biblionumber}, + 'biblio' => $biblionumber, 'borrowers' => $member->{borrowernumber}, }, ); -- 2.1.4