diff --git a/acqui/invoice-files.pl b/acqui/invoice-files.pl index f79d0d6569..39ab34d51e 100755 --- a/acqui/invoice-files.pl +++ b/acqui/invoice-files.pl @@ -58,19 +58,11 @@ if ( $op eq 'download' ) { my $fname = $file->{'file_name'}; my $ftype = $file->{'file_type'}; - if ( $input->param('view') && ( $ftype =~ m|^image/|i || $fname =~ /\.pdf/i ) ) { - $fname =~ /\.pdf/i && do { $ftype = 'application/pdf'; }; - print $input->header( - -type => $ftype, - -charset => 'utf-8' - ); - } else { - print $input->header( - -type => $file->{'file_type'}, - -charset => 'utf-8', - -attachment => $file->{'file_name'} - ); - } + print $input->header( + -type => $file->{'file_type'}, + -charset => 'utf-8', + -attachment => $file->{'file_name'} + ); print $file->{'file_content'}; } else { my $details = GetInvoiceDetails($invoiceid); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt index aeb50dbc9d..3507581aa0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt @@ -64,7 +64,7 @@ [% FOREACH f IN files %] - [% f.file_name | html %] + [% f.file_name | html %] [% f.file_type | html %] [% f.file_description | html %] [% f.date_uploaded | $KohaDates %]