Revision ee264bd8
Von Tamino Steinert vor 9 Monaten hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
33 | 33 |
use SL::DB::Shipto; |
34 | 34 |
use SL::DB::Translation; |
35 | 35 |
use SL::DB::ValidityToken; |
36 |
use SL::DB::EmailJournal; |
|
37 |
use SL::DB::EmailJournalAttachment; |
|
36 | 38 |
|
37 | 39 |
use SL::Helper::CreatePDF qw(:all); |
38 | 40 |
use SL::Helper::PrintOptions; |
... | ... | |
128 | 130 |
); |
129 | 131 |
} |
130 | 132 |
|
133 |
sub action_add_from_email_journal { |
|
134 |
my ($self) = @_; |
|
135 |
my $email_journal_id = $::form->{from_id}; |
|
136 |
my $email_attachment_id = $::form->{email_attachment_id}; |
|
137 |
|
|
138 |
$self->{converted_from_email_journal_id} = $email_journal_id; |
|
139 |
$self->{email_attachment_id} = $email_attachment_id; |
|
140 |
|
|
141 |
$self->action_add(); |
|
142 |
} |
|
143 |
|
|
131 | 144 |
# edit an existing order |
132 | 145 |
sub action_edit { |
133 | 146 |
my ($self) = @_; |
... | ... | |
2285 | 2298 |
} |
2286 | 2299 |
} |
2287 | 2300 |
} |
2301 |
if ($::form->{converted_from_email_journal_id}) { |
|
2302 |
my $email_journal_id = $::form->{converted_from_email_journal_id}; |
|
2303 |
my $src = SL::DB::EmailJournal->new(id => $email_journal_id)->load; |
|
2304 |
$src->link_to_record($self->order); |
|
2305 |
$src->hard_link_to_record($self->order); |
|
2306 |
} |
|
2307 |
if ($::form->{email_attachment_id}) { |
|
2308 |
my $email_attachment_id = $::form->{email_attachment_id}; |
|
2309 |
my $attachment = SL::DB::EmailJournalAttachment->new(id => $email_attachment_id)->load; |
|
2310 |
$attachment->add_file_to_record($self->order); |
|
2311 |
} |
|
2288 | 2312 |
|
2289 | 2313 |
$self->set_project_in_linked_requirement_specs if $self->order->globalproject_id; |
2290 | 2314 |
|
Auch abrufbar als: Unified diff
Workflow: E-Mail → Angebot/Auftrag