Revision 91fc0b6e
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
31 | 31 |
use SL::DB::Translation; |
32 | 32 |
use SL::DB::TransferType; |
33 | 33 |
use SL::DB::ValidityToken; |
34 |
use SL::DB::EmailJournal; |
|
34 | 35 |
use SL::DB::Warehouse; |
35 | 36 |
use SL::DB::Helper::RecordLink qw(set_record_link_conversions RECORD_ID RECORD_TYPE_REF RECORD_ITEM_ID RECORD_ITEM_TYPE_REF); |
36 | 37 |
use SL::DB::Helper::TypeDataProxy; |
... | ... | |
135 | 136 |
$self->action_add; |
136 | 137 |
} |
137 | 138 |
|
139 |
sub action_add_from_email_journal { |
|
140 |
my ($self) = @_; |
|
141 |
die "No 'email_journal_id' was given." unless ($::form->{email_journal_id}); |
|
142 |
|
|
143 |
$self->action_add(); |
|
144 |
} |
|
145 |
|
|
146 |
sub action_edit_with_email_journal_workflow { |
|
147 |
my ($self) = @_; |
|
148 |
die "No 'email_journal_id' was given." unless ($::form->{email_journal_id}); |
|
149 |
$::form->{workflow_email_journal_id} = delete $::form->{email_journal_id}; |
|
150 |
$::form->{workflow_email_attachment_id} = delete $::form->{email_attachment_id}; |
|
151 |
|
|
152 |
$self->action_edit(); |
|
153 |
} |
|
154 |
|
|
138 | 155 |
# edit an existing order |
139 | 156 |
sub action_edit { |
140 | 157 |
my ($self) = @_; |
... | ... | |
538 | 555 |
type => $to_type, |
539 | 556 |
from_id => $self->order->id, |
540 | 557 |
from_type => $self->order->type, |
558 |
email_journal_id => $::form->{workflow_email_journal_id}, |
|
559 |
email_attachment_id => $::form->{workflow_email_attachment_id}, |
|
541 | 560 |
%additional_params, |
542 | 561 |
); |
543 | 562 |
} |
... | ... | |
551 | 570 |
controller => 'do.pl', |
552 | 571 |
action => 'invoice_from_delivery_order_controller', |
553 | 572 |
from_id => $self->order->id, |
573 |
email_journal_id => $::form->{workflow_email_journal_id}, |
|
574 |
email_attachment_id => $::form->{workflow_email_attachment_id}, |
|
554 | 575 |
); |
555 | 576 |
} |
556 | 577 |
|
... | ... | |
1659 | 1680 |
items_to_delete => $items_to_delete, |
1660 | 1681 |
); |
1661 | 1682 |
|
1683 |
if ($::form->{email_journal_id}) { |
|
1684 |
my $email_journal = SL::DB::EmailJournal->new( |
|
1685 |
id => delete $::form->{email_journal_id} |
|
1686 |
)->load; |
|
1687 |
$email_journal->link_to_record_with_attachment( |
|
1688 |
$self->order, |
|
1689 |
delete $::form->{email_attachment_id} |
|
1690 |
); |
|
1691 |
} |
|
1692 |
|
|
1662 | 1693 |
delete $::form->{form_validity_token}; |
1663 | 1694 |
} |
1664 | 1695 |
|
Auch abrufbar als: Unified diff
Workflow: E-Mail → Lieferschein hinzugefügt