Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision cdf32772

Von Tamino Steinert vor 12 Monaten hinzugefügt

  • ID cdf32772b7c260956234ec44b8f7031f52ebfcbc
  • Vorgänger c3710cbe
  • Nachfolger 50a4349d

Workflow: E-Mail → Angebot/Auftrag

Unterschiede anzeigen:

SL/Controller/Order.pm
32 32
use SL::DB::RecordLink;
33 33
use SL::DB::Shipto;
34 34
use SL::DB::Translation;
35
use SL::DB::EmailJournal;
36
use SL::DB::EmailJournalAttachment;
35 37
use SL::DB::ValidityToken;
36 38
use SL::DB::Helper::RecordLink qw(set_record_link_conversions RECORD_ID RECORD_TYPE_REF RECORD_ITEM_ID RECORD_ITEM_TYPE_REF);
37 39
use SL::DB::Helper::TypeDataProxy;
......
156 158
  $self->action_edit();
157 159
}
158 160

  
161
sub action_add_from_email_journal {
162
  my ($self) = @_;
163
  my $email_journal_id    = $::form->{from_id};
164
  my $email_attachment_id = $::form->{email_attachment_id};
165

  
166
  $self->order->{RECORD_ID()}       = $email_journal_id;
167
  $self->order->{RECORD_TYPE_REF()} = 'SL::DB::EmailJournal';
168
  $self->{email_attachment_id} = $email_attachment_id;
169

  
170
  $self->action_add();
171
}
172

  
159 173
# edit an existing order
160 174
sub action_edit {
161 175
  my ($self) = @_;
......
2112 2126
                          set_project_in_linked_requirement_specs                => 1,
2113 2127
  );
2114 2128

  
2129
  if ($::form->{email_attachment_id}) {
2130
    my $attachment = SL::DB::EmailJournalAttachment->new(id => $::form->{email_attachment_id})->load;
2131
    $attachment->add_file_to_record($self->order);
2132
  }
2133

  
2115 2134
  if ($is_new && $self->order->is_sales) {
2116 2135
    my $imap_client = SL::IMAPClient->new();
2117 2136
    if ($imap_client) {

Auch abrufbar als: Unified diff