44 |
44 |
use SL::File;
|
45 |
45 |
use SL::Helper::Flash qw(flash);
|
46 |
46 |
use SL::Locale::String qw(t8);
|
|
47 |
use SL::Presenter::EmailJournal;
|
47 |
48 |
use SL::Presenter::FileObject;
|
48 |
49 |
use SL::Presenter::WebdavObject;
|
49 |
50 |
use SL::ReportGenerator;
|
... | ... | |
404 |
405 |
'fee' => { 'text' => $locale->text('Total Fees') },
|
405 |
406 |
'interest' => { 'text' => $locale->text('Interest') },
|
406 |
407 |
'salesman' => { 'text' => $locale->text('Salesperson'), 'visible' => $form->{l_salesman} ? 1 : 0 },
|
407 |
|
'documents' => { 'text' => $locale->text('Documents'), 'visible' => $::instance_conf->get_doc_storage ? 1 : 0 },
|
408 |
|
'webdav' => { 'text' => $locale->text('WebDAV'), 'visible' => $::instance_conf->get_webdav ? 1 : 0 },
|
|
408 |
'documents' => { 'text' => $locale->text('Documents'), 'visible' => $::instance_conf->get_doc_storage ? 1 : 0 },
|
|
409 |
'webdav' => { 'text' => $locale->text('WebDAV'), 'visible' => $::instance_conf->get_webdav ? 1 : 0 },
|
|
410 |
'mails' => { 'text' => $locale->text('Mails'), 'visible' => $::instance_conf->get_email_journal ? 1 : 0 },
|
409 |
411 |
);
|
410 |
412 |
|
411 |
413 |
$report->set_columns(%column_defs);
|
412 |
414 |
$report->set_column_order(qw(checkbox dunning_description dunning_id customername language invnumber transdate
|
413 |
|
duedate amount dunning_date dunning_duedate fee interest salesman));
|
|
415 |
duedate amount dunning_date dunning_duedate fee interest salesman departmentname mails webdav documents));
|
414 |
416 |
$report->set_sort_indicator($form->{sort}, $form->{sortdir});
|
415 |
417 |
|
416 |
418 |
my $edit_url = sub { build_std_url('script=' . ($_[0]->{invoice} ? 'is' : 'ar') . '.pl', 'action=edit', 'callback') . '&id=' . $::form->escape($_[0]->{id}) };
|
... | ... | |
500 |
502 |
}
|
501 |
503 |
}
|
502 |
504 |
|
|
505 |
if ($::instance_conf->get_email_journal) {
|
|
506 |
my @mail_links = RecordLinks->get_links(from_table => 'dunning', to_table => 'email_journal', from_id => $ref->{dunning_table_id});
|
|
507 |
if (scalar @mail_links) {
|
|
508 |
my $email_journals = SL::DB::Manager::EmailJournal->get_all(where => [id => [ map { $_->{to_id} } @mail_links ]]);
|
|
509 |
my $html = join '<br>', map { SL::Presenter::EmailJournal::email_journal($_) } @$email_journals;
|
|
510 |
my $text = join "\n", map { $_->subject } @$email_journals;
|
|
511 |
$row->{mails} = { 'raw_data' => $html, data => $text };
|
|
512 |
} else {
|
|
513 |
$row->{mails} = { };
|
|
514 |
}
|
|
515 |
}
|
|
516 |
|
503 |
517 |
push @{ $current_dunning_rows }, $row;
|
504 |
518 |
|
505 |
519 |
$previous_dunning_id = $ref->{dunning_id};
|
Mahnungsbericht: E-Mails f. Mahnungen anzeigen