Revision c48270dd
Von Bernd Bleßmann vor etwa 3 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
14 | 14 |
use SL::Util qw(trim); |
15 | 15 |
use SL::YAML; |
16 | 16 |
use SL::DB::AdditionalBillingAddress; |
17 |
use SL::DB::AuthUser; |
|
17 | 18 |
use SL::DB::History; |
18 | 19 |
use SL::DB::Order; |
19 | 20 |
use SL::DB::Default; |
... | ... | |
426 | 427 |
|
427 | 428 |
my %files = $self->get_files_for_email_dialog(); |
428 | 429 |
|
429 |
$self->{all_employees} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]); |
|
430 |
my @employees_with_email = grep { |
|
431 |
my $user = SL::DB::Manager::AuthUser->find_by(login => $_->login); |
|
432 |
$user && !!trim($user->get_config_value('email')); |
|
433 |
} @{ SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]) }; |
|
434 |
|
|
430 | 435 |
my $dialog_html = $self->render('common/_send_email_dialog', { output => 0 }, |
431 | 436 |
email_form => $email_form, |
432 | 437 |
show_bcc => $::auth->assert('email_bcc', 'may fail'), |
433 | 438 |
FILES => \%files, |
434 | 439 |
is_customer => $self->cv eq 'customer', |
435 |
ALL_EMPLOYEES => $self->{all_employees},
|
|
440 |
ALL_EMPLOYEES => \@employees_with_email,
|
|
436 | 441 |
); |
437 | 442 |
|
438 | 443 |
$self->js |
bin/mozilla/io.pl | ||
---|---|---|
54 | 54 |
use SL::File; |
55 | 55 |
use SL::PriceSource; |
56 | 56 |
use SL::Presenter::Part; |
57 |
use SL::Util qw(trim); |
|
57 | 58 |
|
59 |
use SL::DB::AuthUser; |
|
58 | 60 |
use SL::DB::Contact; |
59 | 61 |
use SL::DB::Currency; |
60 | 62 |
use SL::DB::Customer; |
... | ... | |
2113 | 2115 |
$body_params{fallback_translation_type} = "preset_text_invoice"; |
2114 | 2116 |
} |
2115 | 2117 |
|
2116 |
$::form->{all_employees} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]); |
|
2118 |
my @employees_with_email = grep { |
|
2119 |
my $user = SL::DB::Manager::AuthUser->find_by(login => $_->login); |
|
2120 |
$user && !!trim($user->get_config_value('email')); |
|
2121 |
} @{ SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]) }; |
|
2117 | 2122 |
|
2118 | 2123 |
my $email_form = { |
2119 | 2124 |
to => $email, |
... | ... | |
2131 | 2136 |
FILES => \%files, |
2132 | 2137 |
is_customer => $::form->{vc} eq 'customer', |
2133 | 2138 |
is_invoice_mail => ($record_email && $::form->{type} eq 'invoice'), |
2134 |
ALL_EMPLOYEES => $::form->{all_employees},
|
|
2139 |
ALL_EMPLOYEES => \@employees_with_email,
|
|
2135 | 2140 |
}); |
2136 | 2141 |
|
2137 | 2142 |
print $::form->ajax_response_header, $html; |
Auch abrufbar als: Unified diff
E-Mail-Versand: CC: nur kivi-Benutzer mit hinterlegter E-Mail-Adresse anzeigen