From: Bernd Bleßmann Date: Fri, 19 Mar 2021 14:51:21 +0000 (+0100) Subject: Mahnungsbericht: Webdav-Dateien f. Mahnlauf anzeigen X-Git-Tag: kivitendo-mebil_0.1-0~9^2~405 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=73a215a842f89f2eecfc9ff733a024a2e401841f;p=kivitendo-erp.git Mahnungsbericht: Webdav-Dateien f. Mahnlauf anzeigen --- diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index bc6798c6f..1ac780f58 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -44,6 +44,7 @@ use SL::File; use SL::Helper::Flash qw(flash); use SL::Locale::String qw(t8); use SL::Presenter::FileObject; +use SL::Presenter::WebdavObject; use SL::ReportGenerator; require "bin/mozilla/common.pl"; @@ -383,7 +384,8 @@ sub show_dunning { 'fee' => { 'text' => $locale->text('Total Fees') }, 'interest' => { 'text' => $locale->text('Interest') }, 'salesman' => { 'text' => $locale->text('Salesperson'), 'visible' => $form->{l_salesman} ? 1 : 0 }, - 'documents' => { 'text' => $locale->text('Documents') , 'visible' => $::instance_conf->get_doc_storage ? 1 : 0 }, + 'documents' => { 'text' => $locale->text('Documents'), 'visible' => $::instance_conf->get_doc_storage ? 1 : 0 }, + 'webdav' => { 'text' => $locale->text('WebDAV'), 'visible' => $::instance_conf->get_webdav ? 1 : 0 }, ); $report->set_columns(%column_defs); @@ -463,6 +465,20 @@ sub show_dunning { $row->{documents} = { }; } } + if ($::instance_conf->get_webdav && $first_row_for_dunning) { + my $webdav = SL::Webdav->new( + type => 'dunning', + number => $ref->{dunning_id}, + ); + my @all_objects = $webdav->get_all_objects; + if (scalar @all_objects) { + my $html = join '
', map { SL::Presenter::WebdavObject::webdav_object($_) } @all_objects; + my $text = join "\n", map { $_->filename } @all_objects; + $row->{webdav} = { 'raw_data' => $html, data => $text }; + } else { + $row->{webdav} = { }; + } + } push @{ $current_dunning_rows }, $row;