Revision b827f193
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
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) = @_; |
... | ... | |
2149 | 2163 |
set_project_in_linked_requirement_specs => 1, |
2150 | 2164 |
); |
2151 | 2165 |
|
2166 |
if ($::form->{email_attachment_id}) { |
|
2167 |
my $attachment = SL::DB::EmailJournalAttachment->new(id => $::form->{email_attachment_id})->load; |
|
2168 |
$attachment->add_file_to_record($self->order); |
|
2169 |
} |
|
2170 |
|
|
2152 | 2171 |
if ($is_new && $self->order->is_sales) { |
2153 | 2172 |
my $imap_client = SL::IMAPClient->new(); |
2154 | 2173 |
if ($imap_client) { |
Auch abrufbar als: Unified diff
Workflow: E-Mail → Angebot/Auftrag