From edfac813ea5dd184e35d9b5a7aaf9364c3083871 Mon Sep 17 00:00:00 2001 From: Martin Helmling Date: Tue, 17 Jan 2017 16:55:06 +0100 Subject: [PATCH] BCC an aktuellen Benutzer Falls in der Mandantenkonfiguration diese Option eingeschaltet wird, bekommt de raktuelle Benutzer zu jeder versendeten Email eine blinde Kopie --- SL/DB/MetaSetup/Default.pm | 1 + SL/Form.pm | 8 ++++---- locale/de/all | 1 + sql/Pg-upgrade2/defaults_bcc_to_login.sql | 6 ++++++ templates/webpages/client_config/_features.html | 10 ++++++++++ 5 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 sql/Pg-upgrade2/defaults_bcc_to_login.sql diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index 9d6114a66..c3016be71 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -26,6 +26,7 @@ __PACKAGE__->meta->columns( assemblynumber => { type => 'text' }, assortmentnumber => { type => 'text' }, balance_startdate_method => { type => 'text' }, + bcc_to_login => { type => 'boolean' }, bin_id => { type => 'integer' }, bin_id_ignore_onhand => { type => 'integer' }, businessnumber => { type => 'text' }, diff --git a/SL/Form.pm b/SL/Form.pm index 3969cbfef..644b9dbea 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1127,10 +1127,10 @@ sub parse_template { sub get_bcc_defaults { my ($self, $myconfig, $mybcc) = @_; -# if (SL::DB::Default->get->bcc_to_login) { -# $mybcc .= ", " if $mybcc; -# $mybcc .= $myconfig->{email}; -# } + if (SL::DB::Default->get->bcc_to_login) { + $mybcc .= ", " if $mybcc; + $mybcc .= $myconfig->{email}; + } my $otherbcc = SL::DB::Default->get->global_bcc; if ($otherbcc) { $mybcc .= ", " if $mybcc; diff --git a/locale/de/all b/locale/de/all index cfc16351f..621e64cb8 100644 --- a/locale/de/all +++ b/locale/de/all @@ -2570,6 +2570,7 @@ $self->{texts} = { 'Sellprice for price group \'#1\'' => 'Verkaufspreis für Preisgruppe \'#1\'', 'Sellprice significant places' => 'Verkaufspreis: Nachkommastellen', 'Semicolon' => 'Semikolon', + 'Send a blind copy of all outgoing emails to current user\'s email address?' => 'Eine blinde Kopie aller ausgehenden E-Mails wird an den angemeldeten Nutzer geschickt', 'Send invoice via email' => 'Rechnung via E-Mail verschicken', 'Send letter via e-mail' => 'Brief via E-Mail verschicken', 'Sender' => 'AbsenderIn', diff --git a/sql/Pg-upgrade2/defaults_bcc_to_login.sql b/sql/Pg-upgrade2/defaults_bcc_to_login.sql new file mode 100644 index 000000000..6321fc07e --- /dev/null +++ b/sql/Pg-upgrade2/defaults_bcc_to_login.sql @@ -0,0 +1,6 @@ +-- @tag: defaults_bcc_to_login +-- @description: BCC Email zu aktuellem Benutzer +-- @depends: defaults_global_bcc + +ALTER TABLE defaults ADD bcc_to_login boolean NOT NULL DEFAULT FALSE; + diff --git a/templates/webpages/client_config/_features.html b/templates/webpages/client_config/_features.html index 8e128f34e..b38b66e90 100644 --- a/templates/webpages/client_config/_features.html +++ b/templates/webpages/client_config/_features.html @@ -213,6 +213,16 @@ [% 'Manually sent E-Mails will have their BCC field appended with this address. Will not trigger for employees without the right to send bcc, and will not apply to mails sent by automated jobs.' | $T8 %] + + [% LxERP.t8('Send a BCC to logged in user?') %] + + [% L.yes_no_tag('defaults.bcc_to_login', SELF.defaults.bcc_to_login) %] + + + [% LxERP.t8('Send a blind copy of all outgoing emails to current user\'s email address?') %] + + + [% LxERP.t8('Email journal') %] -- 2.20.1