Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1111ec6b

Von Tamino Steinert vor 3 Monaten hinzugefügt

  • ID 1111ec6b059e19ede848d3e1142b737e7bd8c4b4
  • Vorgänger 4b680a25
  • Nachfolger b97742c6

FIX: S:C:DeliveryOrder: Lieferschein-E-Mail-Adr. von Kunden vorbelegen

behebt: #704 (redmine)

Unterschiede anzeigen:

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