From bcc18db1e4de520a6d6d1ce0378516b2c390ee81 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Tue, 5 Feb 2019 11:56:10 +0100 Subject: [PATCH] =?utf8?q?DMS-Dateianh=C3=A4nge=20beim=20E-Mail-Versand=20?= =?utf8?q?Vorauswahl=20konfigurierbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/MetaSetup/Default.pm | 3 +++ doc/changelog | 2 ++ locale/de/all | 6 ++++++ .../defaults_doc_email_attachment.pl | 20 +++++++++++++++++++ .../webpages/client_config/_features.html | 15 ++++++++++++++ .../webpages/common/_send_email_dialog.html | 11 ++++++++-- 6 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 sql/Pg-upgrade2/defaults_doc_email_attachment.pl diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index fae9ab5f5..c0f6a4411 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -63,6 +63,9 @@ __PACKAGE__->meta->columns( dunning_ar_amount_interest => { type => 'integer' }, dunning_creator => { type => 'enum', check_in => [ 'current_employee', 'invoice_employee' ], db_type => 'dunning_creator', default => 'current_employee' }, duns => { type => 'text' }, + email_attachment_part_files_checked => { type => 'boolean', default => 'true' }, + email_attachment_record_files_checked => { type => 'boolean', default => 'true' }, + email_attachment_vc_files_checked => { type => 'boolean', default => 'true' }, email_journal => { type => 'integer', default => 2 }, expense_accno_id => { type => 'integer' }, fa_bufa_nr => { type => 'text' }, diff --git a/doc/changelog b/doc/changelog index 23684f682..97fee984b 100644 --- a/doc/changelog +++ b/doc/changelog @@ -34,6 +34,8 @@ Kleinere neue Features und Detailverbesserungen: - Verkauf-Rechnungsbericht -> Nicht per E-Mail verschickte Belege anzeigen lassen +- Vorauswahl bei Dateianhängen für den E-Mail-Versand von Belegen konfigurierbar gemacht (Standardmäßig angehakt) + 2019-01-03 - Release 3.5.3 Mittelgroße neue Features: diff --git a/locale/de/all b/locale/de/all index 1354308f8..6b1612073 100755 --- a/locale/de/all +++ b/locale/de/all @@ -2349,6 +2349,12 @@ $self->{texts} = { 'Prepare bank collection via SEPA XML' => 'Einzug via SEPA XML vorbereiten', 'Prepare bank transfer via SEPA XML' => 'Überweisung via SEPA XML vorbereiten', 'Prepayment' => 'Vorauszahlung', + 'Preselect Customer/Vendor documents as email attachments' => 'Vorausgewählte Kunden-/Lieferantendokumente im E-Mail-Anhang', + 'Preselect all documents for the current selected parts in a record as a mail attachment.' => 'Wählt alle Artikel-Dokumente der aktuellen Artikel des Belegs beim E-Mail-Versand aus.', + 'Preselect all documents saved for the current customer/vendor as a mail attachment.' => 'Wählt alle Kunden/Lieferanten-Dokumente beim E-Mail-Versand eines Belegs aus.', + 'Preselect all documents saved for the current record as a mail attachment.' => 'Wählt alle Dateianhänge des aktuellen Belegs beim E-Mail-Versand aus.', + 'Preselect part documents as email attachments' => 'Vorausgewählte Artikeldokumente im E-Mail-Anhang', + 'Preselect record documents as email attachments' => 'Vorausgewählte Dateianhänge im E-Mail-Anhang', 'Preselected bin' => 'Vorausgewählter Lagerplatz', 'Preselected cutoff date' => 'Vorausgewählter Stichtag', 'Preselected warehouse' => 'Vorausgewähltes Lager', diff --git a/sql/Pg-upgrade2/defaults_doc_email_attachment.pl b/sql/Pg-upgrade2/defaults_doc_email_attachment.pl new file mode 100644 index 000000000..87c4401eb --- /dev/null +++ b/sql/Pg-upgrade2/defaults_doc_email_attachment.pl @@ -0,0 +1,20 @@ +# @tag: defaults_doc_email_attachment +# @description: Einstellen der Haken für Anhänge beim Belegversand für E-Mails (Standard alle angehakt) +# @depends: release_3_5_3 +package SL::DBUpgrade2::defaults_doc_email_attachment; + +use utf8; + +use parent qw(SL::DBUpgrade2::Base); +use strict; + +sub run { + my ($self) = @_; + + $self->db_query(qq|ALTER TABLE defaults ADD COLUMN email_attachment_vc_files_checked boolean DEFAULT true|); + $self->db_query(qq|ALTER TABLE defaults ADD COLUMN email_attachment_part_files_checked boolean DEFAULT true|); + $self->db_query(qq|ALTER TABLE defaults ADD COLUMN email_attachment_record_files_checked boolean DEFAULT true|); + return 1; +} + +1; diff --git a/templates/webpages/client_config/_features.html b/templates/webpages/client_config/_features.html index a5aedd179..09c807512 100644 --- a/templates/webpages/client_config/_features.html +++ b/templates/webpages/client_config/_features.html @@ -77,6 +77,21 @@ [% L.hidden_tag('defaults.doc_max_filesize',SELF.defaults.doc_max_filesize) %] MB [% LxERP.t8('The maximum of uploadable filesize in Megabyte') %] + + [% LxERP.t8('Preselect Customer/Vendor documents as email attachments') %] + [% L.yes_no_tag('defaults.email_attachment_vc_files_checked', SELF.defaults.email_attachment_vc_files_checked) %] + [% LxERP.t8('Preselect all documents saved for the current customer/vendor as a mail attachment.') %] + + + [% LxERP.t8('Preselect part documents as email attachments') %] + [% L.yes_no_tag('defaults.email_attachment_part_files_checked', SELF.defaults.email_attachment_part_files_checked) %] + [% LxERP.t8('Preselect all documents for the current selected parts in a record as a mail attachment.') %] + + + [% LxERP.t8('Preselect record documents as email attachments') %] + [% L.yes_no_tag('defaults.email_attachment_record_files_checked', SELF.defaults.email_attachment_record_files_checked) %] + [% LxERP.t8('Preselect all documents saved for the current record as a mail attachment.') %] + [% LxERP.t8("Storage Backends") %] [% LxERP.t8('Files') %] diff --git a/templates/webpages/common/_send_email_dialog.html b/templates/webpages/common/_send_email_dialog.html index 3b00f1a28..36713ea4a 100644 --- a/templates/webpages/common/_send_email_dialog.html +++ b/templates/webpages/common/_send_email_dialog.html @@ -3,7 +3,7 @@ [% BLOCK attach_file_list %] [% IF files.as_list.size %] - [% SET have_files = 1 ; + [% SET have_files = 1; FOREACH file = files.as_list %] @@ -12,7 +12,11 @@ [% END %] - [% P.checkbox_tag("email_form.attach_file_ids[]", label=file.db_file.file_name, value=file.db_file.id, checked="1") %] + [% IF checked %] + [% P.checkbox_tag("email_form.attach_file_ids[]", label=file.db_file.file_name, value=file.db_file.id, checked="1") %] + [% ELSE %] + [% P.checkbox_tag("email_form.attach_file_ids[]", label=file.db_file.file_name, value=file.db_file.id, checked="0") %] + [% END %] [% END %] @@ -87,14 +91,17 @@ [% IF INSTANCE_CONF.get_doc_storage %] [% PROCESS attach_file_list files = FILES.files + checked = INSTANCE_CONF.get_email_attachment_record_files_checked label = LxERP.t8("Record's files") %] [% PROCESS attach_file_list files = FILES.vc_files + checked = INSTANCE_CONF.get_email_attachment_vc_files_checked label = is_customer ? LxERP.t8("Files from customer") : LxERP.t8("Files from vendor") %] [% PROCESS attach_file_list files = FILES.part_files + checked = INSTANCE_CONF.get_email_attachment_part_files_checked label = LxERP.t8("Files from parts") %] [% END %] -- 2.20.1