Revision e4bcffbd
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
108 | 108 |
my $order = SL::DB::Order->new(id => $self->{converted_from_oe_id})->load; |
109 | 109 |
|
110 | 110 |
my $target_type = $::form->{type}; |
111 |
my $delivery_order = SL::Model::Record->new_from_workflow($order, $target_type); |
|
111 |
my $delivery_order = SL::Model::Record->new_from_workflow($order, ref($self->order), $target_type);
|
|
112 | 112 |
$self->order($delivery_order); |
113 | 113 |
|
114 | 114 |
$self->action_add; |
... | ... | |
120 | 120 |
my $reclamation = SL::DB::Reclamation->new(id => $::form->{from_id})->load; |
121 | 121 |
my $target_type = $reclamation->is_sales ? 'rma_delivery_order' |
122 | 122 |
: 'supplier_delivery_order'; |
123 |
my $delivery_order = SL::Model::Record->new_from_workflow($reclamation, $target_type); |
|
123 |
my $delivery_order = SL::Model::Record->new_from_workflow($reclamation, ref($self->order), $target_type);
|
|
124 | 124 |
$self->{converted_from_reclamation_id} = $::form->{from_id}; |
125 | 125 |
$self->order($delivery_order); |
126 | 126 |
|
... | ... | |
185 | 185 |
my @multi_orders = map { SL::DB::DeliveryOrder->new(id => $_)->load } @multi_ids; |
186 | 186 |
$self->{converted_from_oe_id} = join ' ', map { $_->id } @multi_orders; |
187 | 187 |
my $target_type = SALES_DELIVERY_ORDER_TYPE(); |
188 |
my $delivery_order = SL::Model::Record->new_from_workflow_multi(\@multi_orders, $target_type, sort_sources_by => 'transdate'); |
|
188 |
my $delivery_order = SL::Model::Record->new_from_workflow_multi(\@multi_orders, ref($self->order), $target_type, sort_sources_by => 'transdate');
|
|
189 | 189 |
$self->order($delivery_order); |
190 | 190 |
|
191 | 191 |
$self->action_edit(); |
... | ... | |
1633 | 1633 |
# always save |
1634 | 1634 |
$self->save(); |
1635 | 1635 |
|
1636 |
my $delivery_order = SL::Model::Record->new_from_workflow($self->order, $destination_type, {});
|
|
1636 |
my $delivery_order = SL::Model::Record->new_from_workflow($self->order, ref($self->order), $destination_type);
|
|
1637 | 1637 |
$self->order($delivery_order); |
1638 | 1638 |
$self->{converted_from_oe_id} = delete $::form->{id}; |
1639 | 1639 |
|
... | ... | |
1669 | 1669 |
# always save |
1670 | 1670 |
$self->save(); |
1671 | 1671 |
|
1672 |
my $delivery_order = SL::Model::Record->new_from_workflow($self->order, $destination_type, {});
|
|
1672 |
my $delivery_order = SL::Model::Record->new_from_workflow($self->order, ref($self->order), $destination_type);
|
|
1673 | 1673 |
$self->order($delivery_order); |
1674 | 1674 |
$self->{converted_from_oe_id} = delete $::form->{id}; |
1675 | 1675 |
|
Auch abrufbar als: Unified diff
Model::Record: übergebe Typ für new_from_workflow und ..._multi