|
Lines 884-890
elsif ($phase eq 'Run this report'){
Link Here
|
| 884 |
my $data = $sth2->fetchall_arrayref( {} ); |
884 |
my $data = $sth2->fetchall_arrayref( {} ); |
| 885 |
my $notice_rendered = |
885 |
my $notice_rendered = |
| 886 |
process_tt( $notice_template->content, { data => $data, report_id => $report_id } ); |
886 |
process_tt( $notice_template->content, { data => $data, report_id => $report_id } ); |
| 887 |
$template->param( processed_notice => $notice_rendered ); |
887 |
my $title_rendered = |
|
|
888 |
process_tt( $notice_template->title, { data => $data, report_id => $report_id } ); |
| 889 |
$template->param( |
| 890 |
template_id => $template_id, processed_notice => $notice_rendered, |
| 891 |
processed_notice_title => $title_rendered |
| 892 |
); |
| 888 |
} |
893 |
} |
| 889 |
|
894 |
|
| 890 |
$template->param( |
895 |
$template->param( |
|
Lines 983-988
elsif ($phase eq 'Export'){
Link Here
|
| 983 |
$content .= $_ while <$ods_fh>; |
988 |
$content .= $_ while <$ods_fh>; |
| 984 |
unlink $ods_filepath; |
989 |
unlink $ods_filepath; |
| 985 |
} |
990 |
} |
|
|
991 |
elsif ( $format eq 'template' ) { |
| 992 |
my $template_id = $input->param('template'); |
| 993 |
my $notice_template = Koha::Notice::Templates->find($template_id); |
| 994 |
my $data = $sth->fetchall_arrayref({}); |
| 995 |
$content = process_tt( $notice_template->content, { data => $data, report_id => $report_id, for_download => 1 } ); |
| 996 |
$reportfilename = process_tt( $notice_template->title, { data => $data, report_id => $report_id } ); |
| 997 |
} |
| 986 |
} |
998 |
} |
| 987 |
print $input->header( |
999 |
print $input->header( |
| 988 |
-type => $type, |
1000 |
-type => $type, |
| 989 |
- |
|
|