Revision ee264bd8
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
| SL/Controller/Order.pm | ||
|---|---|---|
| use SL::DB::Shipto;
 | ||
| use SL::DB::Translation;
 | ||
| use SL::DB::ValidityToken;
 | ||
| use SL::DB::EmailJournal;
 | ||
| use SL::DB::EmailJournalAttachment;
 | ||
|  | ||
| use SL::Helper::CreatePDF qw(:all);
 | ||
| use SL::Helper::PrintOptions;
 | ||
| ... | ... | |
|   );
 | ||
| }
 | ||
|  | ||
| sub action_add_from_email_journal {
 | ||
|   my ($self) = @_;
 | ||
|   my $email_journal_id    = $::form->{from_id};
 | ||
|   my $email_attachment_id = $::form->{email_attachment_id};
 | ||
|  | ||
|   $self->{converted_from_email_journal_id} = $email_journal_id;
 | ||
|   $self->{email_attachment_id}             = $email_attachment_id;
 | ||
|  | ||
|   $self->action_add();
 | ||
| }
 | ||
|  | ||
| # edit an existing order
 | ||
| sub action_edit {
 | ||
|   my ($self) = @_;
 | ||
| ... | ... | |
|         }
 | ||
|       }
 | ||
|     }
 | ||
|     if ($::form->{converted_from_email_journal_id}) {
 | ||
|       my $email_journal_id = $::form->{converted_from_email_journal_id};
 | ||
|       my $src = SL::DB::EmailJournal->new(id => $email_journal_id)->load;
 | ||
|       $src->link_to_record($self->order);
 | ||
|       $src->hard_link_to_record($self->order);
 | ||
|     }
 | ||
|     if ($::form->{email_attachment_id}) {
 | ||
|       my $email_attachment_id = $::form->{email_attachment_id};
 | ||
|       my $attachment = SL::DB::EmailJournalAttachment->new(id => $email_attachment_id)->load;
 | ||
|       $attachment->add_file_to_record($self->order);
 | ||
|     }
 | ||
|  | ||
|     $self->set_project_in_linked_requirement_specs if $self->order->globalproject_id;
 | ||
|  | ||
Auch abrufbar als: Unified diff
Workflow: E-Mail → Angebot/Auftrag