Revision acfb1186
Von Tamino Steinert vor etwa 1 Monat hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
426 | 426 |
|
427 | 427 |
my $cv_method = $self->cv; |
428 | 428 |
|
429 |
if (!$self->order->$cv_method) { |
|
429 |
my $cv = $self->order->customervendor; |
|
430 |
if (!$cv) { |
|
430 | 431 |
return $self->js->flash('error', |
431 | 432 |
$self->cv eq 'customer' ? |
432 | 433 |
t8('Cannot send E-mail without customer given') |
... | ... | |
435 | 436 |
} |
436 | 437 |
|
437 | 438 |
my $email_form; |
438 |
$email_form->{to} = $self->order->contact->cp_email if $self->order->contact; |
|
439 |
$email_form->{to} ||= $self->order->$cv_method->email; |
|
440 |
$email_form->{cc} = $self->order->$cv_method->cc; |
|
441 |
$email_form->{bcc} = join ', ', grep $_, $self->order->$cv_method->bcc; |
|
439 |
$email_form->{to} = |
|
440 |
($self->order->contact ? $self->order->contact->cp_email : undef) |
|
441 |
|| ($cv->is_customer ? $cv->delivery_order_mail : undef) |
|
442 |
|| $cv->email; |
|
443 |
$email_form->{cc} = $cv->cc; |
|
444 |
$email_form->{bcc} = join ', ', grep $_, $cv->bcc; |
|
442 | 445 |
# Todo: get addresses from shipto, if any |
443 | 446 |
|
444 | 447 |
my $form = Form->new; |
Auch abrufbar als: Unified diff
FIX: S:C:DeliveryOrder: Lieferschein-E-Mail-Adr. von Kunden vorbelegen