$template->param( picture => 1 ) if $picture;
# get authorised values with type of BOR_NOTES
-my $dbh = C4::Context->dbh;
-my @canned_notes;
-my $sth = $dbh->prepare('SELECT * FROM authorised_values WHERE category = "BOR_NOTES"');
-$sth->execute();
-while ( my $row = $sth->fetchrow_hashref() ) {
- push @canned_notes, $row;
-}
-if ( scalar( @canned_notes ) ) {
- $template->param( canned_bor_notes_loop => \@canned_notes );
-}
+
+my $canned_notes = GetAuthorisedValues("BOR_NOTES");
$template->param(
debt_confirmed => $debt_confirmed,
AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
dateformat => C4::Context->preference("dateformat"),
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
+ canned_bor_notes_loop => $canned_notes,
);
output_html_with_http_headers $query, $cookie, $template->output;