projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f9c38bb
)
E-Mail-Versand: CC an andere kivi-Benutzer per Auswahlliste
author
Jan Büren
<jan@kivitendo.de>
Fri, 14 May 2021 08:32:37 +0000
(10:32 +0200)
committer
Jan Büren
<jan@kivitendo.de>
Fri, 14 May 2021 08:32:37 +0000
(10:32 +0200)
SL/Controller/Order.pm
patch
|
blob
|
history
SL/Form.pm
patch
|
blob
|
history
bin/mozilla/io.pl
patch
|
blob
|
history
doc/changelog
patch
|
blob
|
history
templates/webpages/common/_send_email_dialog.html
patch
|
blob
|
history
diff --git
a/SL/Controller/Order.pm
b/SL/Controller/Order.pm
index
5a7d58e
..
952d90e
100644
(file)
--- a/
SL/Controller/Order.pm
+++ b/
SL/Controller/Order.pm
@@
-423,11
+423,13
@@
sub action_save_and_show_email_dialog {
$email_form->{js_send_function} = 'kivi.Order.send_email()';
my %files = $self->get_files_for_email_dialog();
$email_form->{js_send_function} = 'kivi.Order.send_email()';
my %files = $self->get_files_for_email_dialog();
+ $self->{all_employees} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
my $dialog_html = $self->render('common/_send_email_dialog', { output => 0 },
email_form => $email_form,
show_bcc => $::auth->assert('email_bcc', 'may fail'),
FILES => \%files,
is_customer => $self->cv eq 'customer',
my $dialog_html = $self->render('common/_send_email_dialog', { output => 0 },
email_form => $email_form,
show_bcc => $::auth->assert('email_bcc', 'may fail'),
FILES => \%files,
is_customer => $self->cv eq 'customer',
+ ALL_EMPLOYEES => $self->{all_employees},
);
$self->js
);
$self->js
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
921cb25
..
239f7b9
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-1002,6
+1002,14
@@
sub send_email {
map { $mail->{$_} = $self->{$_} }
qw(cc subject message format);
map { $mail->{$_} = $self->{$_} }
qw(cc subject message format);
+ if ($self->{cc_employee}) {
+ my ($user, $my_emp_cc);
+ $user = SL::DB::Manager::AuthUser->find_by(login => $self->{cc_employee});
+ $my_emp_cc = $user->get_config_value('email') if ref $user eq 'SL::DB::AuthUser';
+ $mail->{cc} .= ", " if $mail->{cc};
+ $mail->{cc} .= $my_emp_cc if $my_emp_cc;
+ }
+
$mail->{bcc} = $self->get_bcc_defaults($myconfig, $self->{bcc});
$mail->{to} = $self->{EMAIL_RECIPIENT} ? $self->{EMAIL_RECIPIENT} : $self->{email};
$mail->{from} = qq|"$myconfig->{name}" <$myconfig->{email}>|;
$mail->{bcc} = $self->get_bcc_defaults($myconfig, $self->{bcc});
$mail->{to} = $self->{EMAIL_RECIPIENT} ? $self->{EMAIL_RECIPIENT} : $self->{email};
$mail->{from} = qq|"$myconfig->{name}" <$myconfig->{email}>|;
diff --git
a/bin/mozilla/io.pl
b/bin/mozilla/io.pl
index
7c7fa49
..
9982d9e
100644
(file)
--- a/
bin/mozilla/io.pl
+++ b/
bin/mozilla/io.pl
@@
-2100,6
+2100,7
@@
sub show_sales_purchase_email_dialog {
$body_params{fallback_translation_type} = "preset_text_invoice";
}
$body_params{fallback_translation_type} = "preset_text_invoice";
}
+ $::form->{all_employees} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
my $email_form = {
to => $email,
cc => $email_cc,
my $email_form = {
to => $email,
cc => $email_cc,
@@
-2116,6
+2117,7
@@
sub show_sales_purchase_email_dialog {
FILES => \%files,
is_customer => $::form->{vc} eq 'customer',
is_invoice_mail => ($record_email && $::form->{type} eq 'invoice'),
FILES => \%files,
is_customer => $::form->{vc} eq 'customer',
is_invoice_mail => ($record_email && $::form->{type} eq 'invoice'),
+ ALL_EMPLOYEES => $::form->{all_employees},
});
print $::form->ajax_response_header, $html;
});
print $::form->ajax_response_header, $html;
diff --git
a/doc/changelog
b/doc/changelog
index
a8b4d81
..
e47f57e
100644
(file)
--- a/
doc/changelog
+++ b/
doc/changelog
@@
-36,6
+36,8
@@
Mittelgroße neue Features:
Mahnung
Kleinere neue Features und Detailverbesserungen:
Mahnung
Kleinere neue Features und Detailverbesserungen:
+ - E-Mail-Versand: Neben dem Freitext CC-Feld kann jetzt auch ein
+ kivitendo Benutzer mittels einer Auswahlliste in CC gesetzt werden
- Falls der Mandant zu jeder Buchung einen Beleg hinzufügen möchte,
ist dies jetzt in der Mandantenkonfiguration einstellbar und falls
zusätzlich die DMS Funktion aktiv ist, bleibt der Bearbeiter nach
- Falls der Mandant zu jeder Buchung einen Beleg hinzufügen möchte,
ist dies jetzt in der Mandantenkonfiguration einstellbar und falls
zusätzlich die DMS Funktion aktiv ist, bleibt der Bearbeiter nach
diff --git
a/templates/webpages/common/_send_email_dialog.html
b/templates/webpages/common/_send_email_dialog.html
index
b58e762
..
79b984c
100644
(file)
--- a/
templates/webpages/common/_send_email_dialog.html
+++ b/
templates/webpages/common/_send_email_dialog.html
@@
-40,6
+40,13
@@
</td>
</tr>
</td>
</tr>
+ [%- IF ALL_EMPLOYEES.size %]
+ <tr class="hidden" data-toggle-recipients="1">
+ <th align="right" nowrap>[% LxERP.t8("CC to Employee") %]</th>
+ <td>[% L.select_tag('email_form.cc_employee', ALL_EMPLOYEES, value_key='login' title_key='safe_name', with_empty=1, style=style) %]</td>
+ </tr>
+ [%- END %]
+
<tr class="hidden" data-toggle-recipients="1">
<th align="right" nowrap>[% LxERP.t8("Cc") %]</th>
<td>[% L.input_tag("email_form.cc", email_form.cc, size="80") %]</td>
<tr class="hidden" data-toggle-recipients="1">
<th align="right" nowrap>[% LxERP.t8("Cc") %]</th>
<td>[% L.input_tag("email_form.cc", email_form.cc, size="80") %]</td>