Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a96b6e95

Von Jan Büren vor mehr als 3 Jahren hinzugefügt

E-Mail-Versand: CC an andere kivi-Benutzer per Auswahlliste

Unterschiede anzeigen:

SL/Controller/Order.pm
423 423
  $email_form->{js_send_function}    = 'kivi.Order.send_email()';
424 424

  
425 425
  my %files = $self->get_files_for_email_dialog();
426
  $self->{all_employees} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
426 427
  my $dialog_html = $self->render('common/_send_email_dialog', { output => 0 },
427 428
                                  email_form  => $email_form,
428 429
                                  show_bcc    => $::auth->assert('email_bcc', 'may fail'),
429 430
                                  FILES       => \%files,
430 431
                                  is_customer => $self->cv eq 'customer',
432
                                  ALL_EMPLOYEES => $self->{all_employees},
431 433
  );
432 434

  
433 435
  $self->js
SL/Form.pm
1002 1002
  map { $mail->{$_} = $self->{$_} }
1003 1003
    qw(cc subject message format);
1004 1004

  
1005
  if ($self->{cc_employee}) {
1006
    my ($user, $my_emp_cc);
1007
    $user        = SL::DB::Manager::AuthUser->find_by(login => $self->{cc_employee});
1008
    $my_emp_cc   = $user->get_config_value('email') if ref $user eq 'SL::DB::AuthUser';
1009
    $mail->{cc} .= ", "       if $mail->{cc};
1010
    $mail->{cc} .= $my_emp_cc if $my_emp_cc;
1011
  }
1012

  
1005 1013
  $mail->{bcc}    = $self->get_bcc_defaults($myconfig, $self->{bcc});
1006 1014
  $mail->{to}     = $self->{EMAIL_RECIPIENT} ? $self->{EMAIL_RECIPIENT} : $self->{email};
1007 1015
  $mail->{from}   = qq|"$myconfig->{name}" <$myconfig->{email}>|;
bin/mozilla/io.pl
2100 2100
    $body_params{fallback_translation_type} = "preset_text_invoice";
2101 2101
  }
2102 2102

  
2103
  $::form->{all_employees} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
2103 2104
  my $email_form = {
2104 2105
    to                  => $email,
2105 2106
    cc                  => $email_cc,
......
2116 2117
    FILES       => \%files,
2117 2118
    is_customer => $::form->{vc} eq 'customer',
2118 2119
    is_invoice_mail => ($record_email && $::form->{type} eq 'invoice'),
2120
    ALL_EMPLOYEES   => $::form->{all_employees},
2119 2121
  });
2120 2122

  
2121 2123
  print $::form->ajax_response_header, $html;
doc/changelog
36 36
     Mahnung
37 37

  
38 38
Kleinere neue Features und Detailverbesserungen:
39
  - E-Mail-Versand: Neben dem Freitext CC-Feld kann jetzt auch ein
40
    kivitendo Benutzer mittels einer Auswahlliste in CC gesetzt werden
39 41
  - Falls der Mandant zu jeder Buchung einen Beleg hinzufügen möchte,
40 42
    ist dies jetzt in der Mandantenkonfiguration einstellbar und falls
41 43
    zusätzlich die DMS Funktion aktiv ist, bleibt der Bearbeiter nach
templates/webpages/common/_send_email_dialog.html
40 40
   </td>
41 41
  </tr>
42 42

  
43
 [%- IF ALL_EMPLOYEES.size %]
44
  <tr class="hidden" data-toggle-recipients="1">
45
   <th align="right" nowrap>[% LxERP.t8("CC to Employee") %]</th>
46
   <td>[% L.select_tag('email_form.cc_employee',  ALL_EMPLOYEES, value_key='login' title_key='safe_name', with_empty=1, style=style) %]</td>
47
  </tr>
48
 [%- END %]
49

  
43 50
  <tr class="hidden" data-toggle-recipients="1">
44 51
   <th align="right" nowrap>[% LxERP.t8("Cc") %]</th>
45 52
   <td>[% L.input_tag("email_form.cc", email_form.cc, size="80") %]</td>

Auch abrufbar als: Unified diff