$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',
+ ALL_EMPLOYEES => $self->{all_employees},
);
$self->js
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}>|;
$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,
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;
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
</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>