From: Bernd Bleßmann Date: Tue, 23 Mar 2021 15:00:44 +0000 (+0100) Subject: Mahnungsbericht: Anzeige f. Dokumente/Mails abschaltbar X-Git-Tag: kivitendo-mebil_0.1-0~9^2~398 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b23ee626fbfac14f9f245373ba8a541dd0913628;p=kivitendo-erp.git Mahnungsbericht: Anzeige f. Dokumente/Mails abschaltbar --- diff --git a/SL/Presenter/Dunning.pm b/SL/Presenter/Dunning.pm index bbf722d1c..de4961439 100644 --- a/SL/Presenter/Dunning.pm +++ b/SL/Presenter/Dunning.pm @@ -20,8 +20,15 @@ sub dunning { my $text = escape($dunning->dunning_config->dunning_description); if (! delete $params{no_link}) { - my $href = 'dn.pl?action=show_dunning&showold=1&dunning_id=' . $dunning->dunning_id; - $text = link_tag($href, $text, %params); + my @flags; + push @flags, 'showold=1'; + push @flags, 'l_mails=1' if $::instance_conf->get_email_journal; + push @flags, 'l_webdav=1' if $::instance_conf->get_webdav; + push @flags, 'l_documents=1' if $::instance_conf->get_doc_storage; + + my $href = 'dn.pl?action=show_dunning&dunning_id=' . $dunning->dunning_id; + $href .= '&' . join '&', @flags if @flags; + $text = link_tag($href, $text, %params); } is_escaped($text); diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 29d20c2c4..c4640efee 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -362,7 +362,8 @@ sub show_dunning { $main::auth->assert('dunning_edit'); my @filter_field_list = qw(customer_id customer dunning_id dunning_level department_id invnumber ordnumber - transdatefrom transdateto dunningfrom dunningto notes showold l_salesman salesman_id); + transdatefrom transdateto dunningfrom dunningto notes showold l_salesman salesman_id + l_mails l_webdav l_documents); report_generator_set_default_sort('customername', 1); @@ -405,9 +406,9 @@ 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 }, - 'webdav' => { 'text' => $locale->text('WebDAV'), 'visible' => $::instance_conf->get_webdav ? 1 : 0 }, - 'mails' => { 'text' => $locale->text('Mails'), 'visible' => $::instance_conf->get_email_journal ? 1 : 0 }, + 'documents' => { 'text' => $locale->text('Documents'), 'visible' => $form->{l_documents}? 1 : 0 }, + 'webdav' => { 'text' => $locale->text('WebDAV'), 'visible' => $form->{l_webdav} ? 1 : 0 }, + 'mails' => { 'text' => $locale->text('Mails'), 'visible' => $form->{l_mails} ? 1 : 0 }, ); $report->set_columns(%column_defs); @@ -475,7 +476,7 @@ sub show_dunning { $row->{language} = { }; } - if ($::instance_conf->get_doc_storage && $first_row_for_dunning) { + if ($form->{l_documents} && $first_row_for_dunning) { my @files = SL::File->get_all_versions(object_id => $ref->{dunning_id}, object_type => 'dunning', file_type => 'document',); @@ -487,7 +488,7 @@ sub show_dunning { $row->{documents} = { }; } } - if ($::instance_conf->get_webdav && $first_row_for_dunning) { + if ($form->{l_webdav} && $first_row_for_dunning) { my $webdav = SL::Webdav->new( type => 'dunning', number => $ref->{dunning_id}, @@ -502,7 +503,7 @@ sub show_dunning { } } - if ($::instance_conf->get_email_journal) { + if ($form->{l_mails}) { my @mail_links = RecordLinks->get_links(from_table => 'dunning', to_table => 'email_journal', from_id => $ref->{dunning_table_id}); if (scalar @mail_links) { my $email_journals = SL::DB::Manager::EmailJournal->get_all(where => [id => [ map { $_->{to_id} } @mail_links ]]); diff --git a/locale/de/all b/locale/de/all index 878561b19..e26b520ac 100755 --- a/locale/de/all +++ b/locale/de/all @@ -3015,6 +3015,7 @@ $self->{texts} = { 'Show AP transactions as part of AP invoice report' => 'Kreditorenbuchungen zusammen mit Verkaufsrechnungen anzeigen', 'Show AR transactions as part of AR invoice report' => 'Debitorenbuchungen zusammen mit Verkaufsrechnungen anzeigen', 'Show Bestbefore' => 'Mindesthaltbarkeit anzeigen', + 'Show E-Mails' => 'E-Mails anzeigen', 'Show Filter' => 'Filter zeigen', 'Show Salesman' => 'Verkäufer anzeigen', 'Show Stornos' => 'Stornos anzeigen', @@ -3035,6 +3036,8 @@ $self->{texts} = { 'Show delivery value report' => 'Lieferwertbericht anzeigen', 'Show details' => 'Details anzeigen', 'Show details and reports of parts, services, assemblies' => 'Details und Berichte von Waren, Dienstleistungen und Erzeugnissen anzeigen', + 'Show documents in WebDAV' => 'Dokumente im WebDAV anzeigen', + 'Show documents in file storage' => 'Dokumente im Dateimanagement anzeigen', 'Show fields used for the best before date?' => 'Felder zur Eingabe des Mindesthaltbarkeitsdatums anzeigen?', 'Show follow ups...' => 'Zeige Wiedervorlagen...', 'Show help text' => 'Hilfetext anzeigen', diff --git a/locale/en/all b/locale/en/all index ca30ce0c3..14cf67a46 100644 --- a/locale/en/all +++ b/locale/en/all @@ -3015,6 +3015,7 @@ $self->{texts} = { 'Show AP transactions as part of AP invoice report' => '', 'Show AR transactions as part of AR invoice report' => '', 'Show Bestbefore' => '', + 'Show E-Mails' => '', 'Show Filter' => '', 'Show Salesman' => '', 'Show Stornos' => '', @@ -3035,6 +3036,8 @@ $self->{texts} = { 'Show delivery value report' => '', 'Show details' => '', 'Show details and reports of parts, services, assemblies' => '', + 'Show documents in WebDAV' => '', + 'Show documents in file storage' => '', 'Show fields used for the best before date?' => '', 'Show follow ups...' => '', 'Show help text' => '', diff --git a/templates/webpages/dunning/search.html b/templates/webpages/dunning/search.html index 0f850b243..53b34e423 100644 --- a/templates/webpages/dunning/search.html +++ b/templates/webpages/dunning/search.html @@ -102,6 +102,20 @@ [% 'Show Salesman' | $T8 %] + + [%- IF INSTANCE_CONF.get_email_journal %] + [% 'Show E-Mails' | $T8 %] + + [%- END %] + [%- IF INSTANCE_CONF.get_webdav %] + [% 'Show documents in WebDAV' | $T8 %] + + [%- END %] + [%- IF INSTANCE_CONF.get_doc_storage %] + [% 'Show documents in file storage' | $T8 %] + + [%- END %] +