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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Aleisha Amohia 2023-11-12 21:26:42 +00:00 committed by Katrin Fischer
parent 285ee25121
commit e6b0eba92f
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 5 additions and 1 deletions

View File

@ -44,6 +44,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
my $ars = Koha::ArticleRequests->search( { id => { '-in' => \@ids } } );
my $slipContent = '';
my $first = 1;
my $style;
while ( my $ar = $ars->next ) {
if ( !$first ) {
$slipContent .= "<hr/>";
@ -71,12 +72,15 @@ while ( my $ar = $ars->next ) {
$slip->{is_html}
? $slip->{content}
: '<pre>' . $slip->{content} . '</pre>';
$style = $slip->{style};
}
$template->param(
slip => $slipContent,
slip => $slipContent,
caller => 'article-request',
plain => 0,
style => $style,
);
output_html_with_http_headers $cgi, $cookie, $template->output;