Lines 30-36
use Koha::Patrons;
Link Here
|
30 |
|
30 |
|
31 |
my $cgi = CGI->new; |
31 |
my $cgi = CGI->new; |
32 |
|
32 |
|
33 |
my $id = $cgi->param('id'); |
33 |
my @ids = split( ',', $cgi->param('id') ); |
34 |
|
34 |
|
35 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
35 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
36 |
{ |
36 |
{ |
Lines 41-70
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
41 |
} |
41 |
} |
42 |
); |
42 |
); |
43 |
|
43 |
|
44 |
my $ar = Koha::ArticleRequests->find($id); |
44 |
my $ars = Koha::ArticleRequests->search({id => {'-in' => \@ids}}); |
|
|
45 |
my $slipContent = ''; |
46 |
my $first=1; |
47 |
while(my $ar = $ars->next) { |
48 |
if(!$first) { |
49 |
$slipContent .= "<hr/>"; |
50 |
} |
51 |
$first = 0; |
52 |
$template->param( article_request => $ar ); |
53 |
my $patron = Koha::Patrons->find( $ar->borrowernumber ); |
45 |
|
54 |
|
46 |
$template->param( article_request => $ar ); |
55 |
my $slip = C4::Letters::GetPreparedLetter( |
47 |
my $patron = Koha::Patrons->find( $ar->borrowernumber ); |
56 |
module => 'circulation', |
|
|
57 |
letter_code => 'AR_SLIP', |
58 |
message_transport_type => 'print', |
59 |
lang => $patron->lang, |
60 |
tables => { |
61 |
article_requests => $ar->id, |
62 |
borrowers => $ar->borrowernumber, |
63 |
biblio => $ar->biblionumber, |
64 |
biblioitems => $ar->biblionumber, |
65 |
items => $ar->itemnumber, |
66 |
branches => $ar->branchcode, |
67 |
}, |
68 |
); |
48 |
|
69 |
|
49 |
my $slip = C4::Letters::GetPreparedLetter( |
70 |
$slipContent .= $slip->{is_html}?$slip->{content}:'<pre>'.$slip->{content}.'</pre>'; |
50 |
module => 'circulation', |
71 |
} |
51 |
letter_code => 'AR_SLIP', |
|
|
52 |
message_transport_type => 'print', |
53 |
lang => $patron->lang, |
54 |
tables => { |
55 |
article_requests => $ar->id, |
56 |
borrowers => $ar->borrowernumber, |
57 |
biblio => $ar->biblionumber, |
58 |
biblioitems => $ar->biblionumber, |
59 |
items => $ar->itemnumber, |
60 |
branches => $ar->branchcode, |
61 |
}, |
62 |
); |
63 |
|
72 |
|
64 |
$template->param( |
73 |
$template->param( |
65 |
slip => $slip->{content}, |
74 |
slip => $slipContent, |
66 |
caller => 'article-request', |
75 |
caller => 'article-request', |
67 |
plain => !$slip->{is_html}, |
76 |
plain => 0, |
68 |
); |
77 |
); |
69 |
|
78 |
|
70 |
output_html_with_http_headers $cgi, $cookie, $template->output; |
79 |
output_html_with_http_headers $cgi, $cookie, $template->output; |