|
Lines 627-635
END_SQL
Link Here
|
| 627 |
print @output_chunks; |
627 |
print @output_chunks; |
| 628 |
} |
628 |
} |
| 629 |
# Generate the content of the csv with headers |
629 |
# Generate the content of the csv with headers |
| 630 |
my $content = join(";", qw(title name surname address1 address2 zipcode city country email itemcount itemsinfo due_date issue_date)) . "\n"; |
630 |
my $content; |
|
|
631 |
if ( defined $csvfilename ) { |
| 632 |
my $delimiter = C4::Context->preference('delimiter') // ';'; |
| 633 |
$content = join($delimiter, qw(title name surname address1 address2 zipcode city country email itemcount itemsinfo due_date issue_date)) . "\n"; |
| 634 |
} |
| 635 |
else { |
| 636 |
$content = ""; |
| 637 |
} |
| 631 |
$content .= join( "\n", @output_chunks ); |
638 |
$content .= join( "\n", @output_chunks ); |
| 632 |
|
639 |
|
| 633 |
my $attachment = { |
640 |
my $attachment = { |
| 634 |
filename => defined $csvfilename ? 'attachment.csv' : 'attachment.txt', |
641 |
filename => defined $csvfilename ? 'attachment.csv' : 'attachment.txt', |
| 635 |
type => 'text/plain', |
642 |
type => 'text/plain', |
| 636 |
- |
|
|