From 73a215a842f89f2eecfc9ff733a024a2e401841f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 19 Mar 2021 15:51:21 +0100 Subject: [PATCH] Mahnungsbericht: Webdav-Dateien f. Mahnlauf anzeigen --- bin/mozilla/dn.pl | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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; -- 2.20.1