From c12c5b9dcc611db943f71c895814ee403079d458 Mon Sep 17 00:00:00 2001
From: Aleisha Amohia <aleishaamohia@hotmail.com>
Date: Fri, 21 Apr 2023 02:10:12 +0000
Subject: [PATCH] Bug 33478: Apply formatting to AR_SLIP
To test:
1. Enable ArticleRequests system preference in Koha Administration -> Global system preferences
2. Log into the OPAC
3. Do a catalogue search
4. Click the 'Request article' button for a record
5. Fill in some information and submit
6. Go to the staff interface
7. Go to Circulation -> Article Requests
8. Click the Actions menu next to your article request and choose Print slip
9. Confirm your format settings for AR_SLIP are applied
---
circ/article-request-slip.pl | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/circ/article-request-slip.pl b/circ/article-request-slip.pl
index f31eac72d06..5912838a3c7 100755
--- a/circ/article-request-slip.pl
+++ b/circ/article-request-slip.pl
@@ -43,6 +43,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
my $ars = Koha::ArticleRequests->search( { id => { '-in' => \@ids } } );
my $slipContent = '';
+my $joined_slip = ();
my $first = 1;
while ( my $ar = $ars->next ) {
if ( !$first ) {
@@ -71,12 +72,14 @@ while ( my $ar = $ars->next ) {
$slip->{is_html}
? $slip->{content}
: '<pre>' . $slip->{content} . '</pre>';
+ $joined_slip = $slip;
}
+$joined_slip->{content} = $slipContent;
+$joined_slip->{is_html} = 1;
$template->param(
- slip => $slipContent,
+ slip => $joined_slip,
caller => 'article-request',
- plain => 0,
);
output_html_with_http_headers $cgi, $cookie, $template->output;
--
2.30.2